diff --git a/cmd/cmd_controller.js b/cmd/cmd_controller.js index 1d838a66..25386886 100644 --- a/cmd/cmd_controller.js +++ b/cmd/cmd_controller.js @@ -56,17 +56,24 @@ class EmbarkController { self.context = options.context || [constants.contexts.run, constants.contexts.build]; let Dashboard = require('./dashboard/dashboard.js'); - let webServerConfig = { - enabled: options.runWebserver - }; + const webServerConfig = {}; - if (options.serverHost) { + if (options.runWebserver != null) { + webServerConfig.enabled = options.runWebserver; + } + + if (options.serverHost != null) { webServerConfig.host = options.serverHost; } - if (options.serverPort) { + + if (options.serverPort != null) { webServerConfig.port = options.serverPort; } + if (options.openBrowser != null) { + webServerConfig.openBrowser = options.openBrowser; + } + const Engine = require('../lib/core/engine.js'); const engine = new Engine({ env: options.env,