From a1bedff7e120431a54af78b6c82c3a6a015aaf07 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 23 Sep 2016 12:43:07 +0800 Subject: [PATCH] add error message if attemping to start without node already running --- lib/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/index.js b/lib/index.js index 06b1d2f9..1cce8432 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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);