diff --git a/JavaScript-API.md b/JavaScript-API.md index 67db4c345..44cb8118c 100644 --- a/JavaScript-API.md +++ b/JavaScript-API.md @@ -166,7 +166,10 @@ The `web3` object provides all methods. ##### Example ```js -var web3 = require('web3') +var Web3 = require('web3'); +// create an instance of web3 using the HTTP provider. +// NOTE in mist web3 is already available, so check first if its available before instantiating +var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); ``` ***