Hello, I want to make a web app which interacts with a contract on testnet/mainnet. I can see in the documentation that the local port to web3js to connect to a local running ethereum instance/simulation:
web3.setProvider(new web3.providers.HttpProvider('
http://localhost:8545'));
But I want to connect it to the testnet or mainnet. Is it possible to do that without actually hosting a real node(test or main) via metamask as a full Ethereum node.
Answers
http://web3js.readthedocs.io/en/1.0/web3.html If you're running MetaMask, then it connects through to Conensys run nodes via the
Web3.givenProvider
if u install metamask, u will have to install testrpc and run it as a local node
Uncaught Error: CONNECTION ERROR: Couldn't connect to node http://localhost:8545.