webServer svc doesn't need to handle cli opts (handled in core/config)
This commit is contained in:
parent
2b5268dc84
commit
c360975e8f
|
@ -154,11 +154,8 @@ class EmbarkController {
|
|||
engine.events.emit("status", __("Ready").green);
|
||||
});
|
||||
|
||||
if (options.runWebserver) {
|
||||
engine.startService("webServer", {
|
||||
host: options.serverHost,
|
||||
port: options.serverPort
|
||||
});
|
||||
if (webServerConfig.enabled !== false) {
|
||||
engine.startService("webServer");
|
||||
}
|
||||
engine.startService("fileWatcher");
|
||||
callback();
|
||||
|
|
|
@ -226,9 +226,8 @@ class Engine {
|
|||
this.watch.start();
|
||||
}
|
||||
|
||||
webServerService(_options) {
|
||||
_options.buildDir = this.config.buildDir;
|
||||
this.registerModule('webserver', _options);
|
||||
webServerService() {
|
||||
this.registerModule('webserver');
|
||||
}
|
||||
|
||||
storageService(_options) {
|
||||
|
|
|
@ -10,18 +10,16 @@ const Templates = {
|
|||
};
|
||||
|
||||
class WebServer {
|
||||
constructor(embark, options) {
|
||||
constructor(embark) {
|
||||
this.embark = embark;
|
||||
this.logger = embark.logger;
|
||||
this.events = embark.events;
|
||||
this.buildDir = options.buildDir;
|
||||
this.buildDir = embark.config.buildDir;
|
||||
this.webServerConfig = embark.config.webServerConfig;
|
||||
if (!this.webServerConfig.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.host = options.host || this.webServerConfig.host;
|
||||
this.port = options.port || this.webServerConfig.port;
|
||||
|
||||
this.events.emit("status", __("Starting Server"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue