diff --git a/lib/start-server.js b/lib/start-server.js index 9044ab12434e..f9e2628c4eeb 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();