mirror of https://github.com/embarklabs/embark.git
use event for when engine is ready to deploy
This commit is contained in:
parent
47591a39dd
commit
c6b555af4e
21
lib/index.js
21
lib/index.js
|
@ -151,16 +151,17 @@ class Embark {
|
|||
engine.logger.info(__("Ready").underline);
|
||||
engine.events.emit("status", __("Ready").green);
|
||||
});
|
||||
|
||||
engine.deployManager.deployContracts(function (err) {
|
||||
engine.startService("fileWatcher");
|
||||
if (options.runWebserver) {
|
||||
engine.startService("webServer", {
|
||||
host: options.serverHost,
|
||||
port: options.serverPort
|
||||
});
|
||||
}
|
||||
callback(err);
|
||||
engine.events.on('engine-ready', function () {
|
||||
engine.deployManager.deployContracts(function (err) {
|
||||
engine.startService("fileWatcher");
|
||||
if (options.runWebserver) {
|
||||
engine.startService("webServer", {
|
||||
host: options.serverHost,
|
||||
port: options.serverPort
|
||||
});
|
||||
}
|
||||
callback(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
], function (err, _result) {
|
||||
|
|
Loading…
Reference in New Issue