From c4c26058ef59eedf28b87da87c5d2f80316daa12 Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Thu, 18 Apr 2019 07:30:39 +1000 Subject: [PATCH] Use port from PORT env variable if available (#502) --- packages/server/src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts index 37d1b74e9..d726c61ce 100644 --- a/packages/server/src/cli.ts +++ b/packages/server/src/cli.ts @@ -25,7 +25,7 @@ commander.version(process.env.VERSION || "development") .option("--data-dir ", "DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.") .option("-h, --host ", "Customize the hostname.", "0.0.0.0") .option("-o, --open", "Open in the browser on startup.", false) - .option("-p, --port ", "Port to bind on.", 8443) + .option("-p, --port ", "Port to bind on.", parseInt(process.env.PORT, 10) || 8443) .option("-N, --no-auth", "Start without requiring authentication.", undefined) .option("-H, --allow-http", "Allow http connections.", false) .option("-P, --password ", "Specify a password for authentication.")