show loading message; immediatly check for services instead of waiting 5 secs

This commit is contained in:
Iuri Matias 2017-01-15 18:46:40 -05:00
parent 136f099b57
commit 0b88d2fa69
3 changed files with 10 additions and 0 deletions

View File

@ -1,4 +1,6 @@
#!/usr/bin/env node
console.log("starting embark...");
var Embark = require('..');
Embark.process(process.argv);

View File

@ -91,6 +91,13 @@ var Embark = {
self.logger.contractsState = Embark.monitor.setContracts;
self.logger.availableServices = Embark.monitor.availableServices;
self.logger.setStatus = Embark.monitor.setStatus.bind(Embark.monitor);
if (options.useDashboard) {
self.logger.info('========================'.bold.green);
self.logger.info(('Welcome to Embark ' + Embark.version).yellow.bold);
self.logger.info('========================'.bold.green);
}
// TODO: do this after monitor is rendered
callback();
},

View File

@ -13,6 +13,7 @@ var ServicesMonitor = function(options) {
};
ServicesMonitor.prototype.startMonitor = function() {
this.check();
this.monitor = setInterval(this.check.bind(this), this.interval);
};