Skip to content

Commit 4c6e4be

Browse files
committedFeb 24, 2020
Fix port being randomized
Also make it a number.
1 parent 04e449c commit 4c6e4be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/node/entry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const main = async (args: Args): Promise<void> => {
3434
commit: commit || "development",
3535
host: args.host || (args.auth === AuthType.Password && typeof args.cert !== "undefined" ? "0.0.0.0" : "localhost"),
3636
password: originalPassword ? hash(originalPassword) : undefined,
37-
port: typeof args.port !== "undefined" ? args.port : process.env.PORT !== "" ? process.env.PORT : 8080,
37+
port: typeof args.port !== "undefined" ? args.port : process.env.PORT ? parseInt(process.env.PORT, 10) : 8080,
3838
socket: args.socket,
3939
}
4040

‎src/node/http.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export interface HttpServerOptions {
100100
readonly commit?: string
101101
readonly host?: string
102102
readonly password?: string
103-
readonly port?: number | string
103+
readonly port?: number
104104
readonly socket?: string
105105
}
106106

0 commit comments

Comments
 (0)
Please sign in to comment.