mist, web3js, dapps, testing – Connecting Mist/Ethereum Wallet with TestRPC

dappsmisttestingweb3js

I need someone who can explain to me, step by step, in simple terms how can I connect the ethereum wallet with the local blockchain.
I found the following link: Connect Mist to ethereum-js testrpc

The problem is I'm still learning how to code and setting up test environments.So this is all new stuff to me.

Can somebody explain to me how and where do I have to put the following lines so that the Ethereum wallet connects with my local blockchain and not with the live testnet?!

web3.setProvider(new web3.providers.HttpProvider("http://localhost:8545"));

Some basic step by step instruction would be nice.

Thanks in regards

Best Answer

There's a very simple way to do this that doesn't involve messing with HTML files.

  1. Install testrpc, if you haven't already. Instructions are here.
  2. Start testrpc in a terminal. This should just work with testrpc, as long as it's installed.
  3. In a different terminal, start mist with Mist --rpc http://localhost:8545

It will warn you that you're connecting (unsafely) over RPC, which is fine, because it's a private testnet. If it worked you'll see in your wallet dapp that you're 1,000 ETH richer. :) It will also say, in red, that it's a private network. Enjoy!