Skip to content

Commit b27e5e3

Browse files
RoyalIcingkylecarbs
authored andcommitted
Use port from PORT env variable if available (#502)
1 parent b75e18d commit b27e5e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/server/src/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ commander.version(process.env.VERSION || "development")
2525
.option("--data-dir <value>", "DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.")
2626
.option("-h, --host <value>", "Customize the hostname.", "0.0.0.0")
2727
.option("-o, --open", "Open in the browser on startup.", false)
28-
.option("-p, --port <number>", "Port to bind on.", 8443)
28+
.option("-p, --port <number>", "Port to bind on.", parseInt(process.env.PORT, 10) || 8443)
2929
.option("-N, --no-auth", "Start without requiring authentication.", undefined)
3030
.option("-H, --allow-http", "Allow http connections.", false)
3131
.option("-P, --password <value>", "Specify a password for authentication.")

0 commit comments

Comments
 (0)