From 4c6e4bedebf0938f2a554938c74e722e1e0171cb Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 24 Feb 2020 16:49:10 -0600 Subject: [PATCH] Fix port being randomized Also make it a number. --- src/node/entry.ts | 2 +- src/node/http.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/entry.ts b/src/node/entry.ts index 33419243e..687efbde7 100644 --- a/src/node/entry.ts +++ b/src/node/entry.ts @@ -34,7 +34,7 @@ const main = async (args: Args): Promise => { commit: commit || "development", host: args.host || (args.auth === AuthType.Password && typeof args.cert !== "undefined" ? "0.0.0.0" : "localhost"), password: originalPassword ? hash(originalPassword) : undefined, - port: typeof args.port !== "undefined" ? args.port : process.env.PORT !== "" ? process.env.PORT : 8080, + port: typeof args.port !== "undefined" ? args.port : process.env.PORT ? parseInt(process.env.PORT, 10) : 8080, socket: args.socket, } diff --git a/src/node/http.ts b/src/node/http.ts index 1ca34ae11..26336a891 100644 --- a/src/node/http.ts +++ b/src/node/http.ts @@ -100,7 +100,7 @@ export interface HttpServerOptions { readonly commit?: string readonly host?: string readonly password?: string - readonly port?: number | string + readonly port?: number readonly socket?: string }