From 1d4e334a86cabb9581a3ba5305a2019a7bbb540d Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Fri, 20 Apr 2018 09:25:12 -0700 Subject: [PATCH] Restore the ability to use the --port command line argument (#588) The behavior was changed in #516. With this change, both the command line argument and environment variable will work. --- lib/start-server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/start-server.js b/lib/start-server.js index 9044ab1243..f9e2628c4e 100755 --- a/lib/start-server.js +++ b/lib/start-server.js @@ -37,7 +37,7 @@ const program = require('commander'); program.option('--port ', 'Specify port number').parse(process.argv); -let port = process.env.PORT || 3000; +let port = parseInt(program.port, 10) || process.env.PORT || 3000; let numAttempts = 0; const MAX_ATTEMPTS = 10; checkPort();