Mist – How to Connect Mist to Ethereum-JS Testrpc

dappsmisttesting

I need to test a DAPP which will run in Mist, but I don't want to run it in TestNet or MainNet, I want to run it in a ethereum-js testrpc instance. Is it possible to do that? Does anybody has tried it?

Best Answer

I finally got the answer. You just have to call:

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

And then you have your web3 instance connected to your testrpc instance connected.