Used env var for the listening port

This commit is contained in:
Logan Cusano
2023-06-03 15:39:16 -04:00
parent 7fbaf31335
commit fa91cbc887

View File

@@ -4,6 +4,7 @@ const log = new DebugBuilder("server", "libUtils");
const { NodeHtmlMarkdown } = require('node-html-markdown');
const { parse } = require("node-html-parser");
const crypto = require("crypto");
require('dotenv').config();
const imageRegex = /(http(s?):)([/|.|\w|\s|-])*((\.(?:jpg|gif|png|webm))|(\/gallery\/(?:[/|.|\w|\s|-])*))/g;
const youtubeVideoRegex = /((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube(-nocookie)?\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)/g
@@ -55,6 +56,7 @@ exports.onError = (error) => {
throw error;
}
var port = process.env.HTTP_PORT;
var bind = typeof port === 'string'
? 'Pipe ' + port
: 'Port ' + port;