diff --git a/lib/modules/webserver/index.js b/lib/modules/webserver/index.js index cf4db794c..54ae25c3d 100644 --- a/lib/modules/webserver/index.js +++ b/lib/modules/webserver/index.js @@ -73,23 +73,26 @@ class WebServer { listenToCommands() { this.events.setCommandHandler('embark-building-placeholder', (cb) => this.buildPlaceholderPage(cb)); - this.events.setCommandHandler('start-webserver', (callback) => this.server.start(callback)); - this.events.setCommandHandler('stop-webserver', (callback) => this.server.stop(callback)); + this.events.setCommandHandler('start-webserver', (cb) => this.server.start(cb)); + this.events.setCommandHandler('stop-webserver', (cb) => this.server.stop(cb)); } registerConsoleCommands() { const self = this; self.embark.registerConsoleCommand((cmd, _options) => { return { - match: () => cmd === "webserver start", - process: (callback) => self.events.request("start-webserver", callback) + match: () => cmd === 'webserver start', + process: (cb) => self.events.request('start-webserver', cb) }; }); self.embark.registerConsoleCommand((cmd, _options) => { return { - match: () => cmd === "webserver stop", - process: (callback) => self.events.request("stop-webserver", callback) + match: () => cmd === 'webserver stop', + process: (cb) => self.events.request('stop-webserver', cb) + }; + }); + }; }); }