Used env var for the listening port
This commit is contained in:
@@ -4,6 +4,7 @@ const log = new DebugBuilder("server", "libUtils");
|
|||||||
const { NodeHtmlMarkdown } = require('node-html-markdown');
|
const { NodeHtmlMarkdown } = require('node-html-markdown');
|
||||||
const { parse } = require("node-html-parser");
|
const { parse } = require("node-html-parser");
|
||||||
const crypto = require("crypto");
|
const crypto = require("crypto");
|
||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
const imageRegex = /(http(s?):)([/|.|\w|\s|-])*((\.(?:jpg|gif|png|webm))|(\/gallery\/(?:[/|.|\w|\s|-])*))/g;
|
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
|
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;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var port = process.env.HTTP_PORT;
|
||||||
var bind = typeof port === 'string'
|
var bind = typeof port === 'string'
|
||||||
? 'Pipe ' + port
|
? 'Pipe ' + port
|
||||||
: 'Port ' + port;
|
: 'Port ' + port;
|
||||||
|
|||||||
Reference in New Issue
Block a user