test null when populating webserver config derived from cli
This commit is contained in:
parent
638fb4ee27
commit
2b5268dc84
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue