Skip to content

Commit bd7583a

Browse files
committed
Obey process.env.PORT
1 parent 33b3523 commit bd7583a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/node/entry.ts

Lines changed: 1 addition & 1 deletion
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 : 8080,
37+
port: typeof args.port !== "undefined" ? args.port : process.env.PORT !== "" ? process.env.PORT : 8080,
3838
socket: args.socket,
3939
}
4040
if (!options.cert && args.cert) {

src/node/http.ts

Lines changed: 1 addition & 1 deletion
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
103+
readonly port?: number | string
104104
readonly socket?: string
105105
}
106106

0 commit comments

Comments
 (0)