Archived
1
0

Obey process.env.PORT

This commit is contained in:
Anmol Sethi 2020-02-21 14:49:44 -05:00
parent 33b3523bf4
commit bd7583a254
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ const main = async (args: Args): Promise<void> => {
commit: commit || "development", commit: commit || "development",
host: args.host || (args.auth === AuthType.Password && typeof args.cert !== "undefined" ? "0.0.0.0" : "localhost"), host: args.host || (args.auth === AuthType.Password && typeof args.cert !== "undefined" ? "0.0.0.0" : "localhost"),
password: originalPassword ? hash(originalPassword) : undefined, password: originalPassword ? hash(originalPassword) : undefined,
port: typeof args.port !== "undefined" ? args.port : 8080, port: typeof args.port !== "undefined" ? args.port : process.env.PORT !== "" ? process.env.PORT : 8080,
socket: args.socket, socket: args.socket,
} }
if (!options.cert && args.cert) { if (!options.cert && args.cert) {

View File

@ -100,7 +100,7 @@ export interface HttpServerOptions {
readonly commit?: string readonly commit?: string
readonly host?: string readonly host?: string
readonly password?: string readonly password?: string
readonly port?: number readonly port?: number | string
readonly socket?: string readonly socket?: string
} }