add error message if attemping to start without node already running
This commit is contained in:
parent
2f9c0a2996
commit
a1bedff7e1
|
@ -155,6 +155,12 @@ var Embark = {
|
|||
var web3Endpoint = 'http://' + self.config.blockchainConfig.rpcHost + ':' + self.config.blockchainConfig.rpcPort;
|
||||
web3.setProvider(new web3.providers.HttpProvider(web3Endpoint));
|
||||
|
||||
if (!web3.isConnected()) {
|
||||
console.log(("Couldn't connect to " + web3Endpoint.underline + " are you sure it's on?").red);
|
||||
console.log("make sure you have an ethereum node or simulator running. e.g 'embark blockchain'".magenta);
|
||||
exit();
|
||||
}
|
||||
|
||||
var deploy = new Deploy(web3, contractsManager, Embark.logger);
|
||||
deploy.deployAll(function() {
|
||||
callback(null, contractsManager);
|
||||
|
|
Loading…
Reference in New Issue