Use port from PORT env variable if available (#502)

This commit is contained in:
Patrick Smith 2019-04-18 07:30:39 +10:00 committed by Kyle Carberry
parent 8a4da542ae
commit c4c26058ef

View File

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