diff --git a/src/node/entry.ts b/src/node/entry.ts index 62696846..f13c847e 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 : 8080, + port: typeof args.port !== "undefined" ? args.port : process.env.PORT !== "" ? process.env.PORT : 8080, socket: args.socket, } if (!options.cert && args.cert) { diff --git a/src/node/http.ts b/src/node/http.ts index 26336a89..1ca34ae1 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 + readonly port?: number | string readonly socket?: string }