Fix port being randomized

Also make it a number.
This commit is contained in:
Asher 2020-02-24 16:49:10 -06:00
parent 04e449c546
commit 4c6e4bedeb
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
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",
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,
}

View File

@ -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
}