From 821a3b848171a3cbf2a3b8f4f3666650a920b50d Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 24 Jul 2019 18:33:55 -0400 Subject: [PATCH] start webserver explicitly instead of implicitly --- packages/embark-webserver/src/index.js | 16 ++++++++-------- packages/embark/src/cmd/cmd_controller.js | 19 +++---------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/packages/embark-webserver/src/index.js b/packages/embark-webserver/src/index.js index d4d91315d..642fdef32 100644 --- a/packages/embark-webserver/src/index.js +++ b/packages/embark-webserver/src/index.js @@ -76,14 +76,14 @@ class WebServer { }); }); - findNextPort(this.port).then((newPort) => { - this.server.port = newPort; - this.events.request('processes:launch', 'webserver', (_err, message, port) => { - this.logger.info(message); - this.port = port; - this.setServiceCheck(); - }); - }); + // findNextPort(this.port).then((newPort) => { + // this.server.port = newPort; + // this.events.request('processes:launch', 'webserver', (_err, message, port) => { + // this.logger.info(message); + // this.port = port; + // }); + // }); + this.setServiceCheck(); this.events.on('check:wentOffline:Webserver', () => { this.logger.info(__("Webserver is offline")); diff --git a/packages/embark/src/cmd/cmd_controller.js b/packages/embark/src/cmd/cmd_controller.js index 531f04bd0..fb6a57903 100644 --- a/packages/embark/src/cmd/cmd_controller.js +++ b/packages/embark/src/cmd/cmd_controller.js @@ -176,25 +176,10 @@ class EmbarkController { console.dir("outputDone") engine.events.emit('outputDone'); }); - }) + }); // this.events.request('watcher:start'); - // engine.startService("processManager"); - // engine.startService("web3"); - // engine.startService("coreProcess"); - // engine.startService("blockchainListener"); - // engine.startService("serviceMonitor"); - // engine.startService("libraryManager"); - // engine.startService("codeRunner"); - // engine.startService("pipeline"); - // engine.startService("deployment"); - // engine.startService("storage"); - // engine.startService("codeGenerator"); - // engine.startService("console"); - // engine.startService("cockpit"); - // engine.startService("pluginCommand"); - // engine.events.on('check:backOnline:Ethereum', function () { // engine.logger.info(__('Ethereum node detected') + '..'); // engine.config.reloadConfig(); @@ -220,6 +205,8 @@ class EmbarkController { engine.startEngine(() => { callback(); + engine.events.request("webserver:start") + engine.events.request("config:contractsFiles", (contractsFiles) => { engine.events.request("compiler:contracts:compile", contractsFiles, (err, compiledContracts) => { console.dir("compilation done")