I want to connet my meteor localhost to ropsten testnet. Therefore i have a lib.js with the connecting commands:
//var Web3 = require('web3');
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
// set the provider you want from Web3.providers
web3 = new Web3(new Web3.providers.HttpProvider("http://ropsten.infura.io/..."));
if(!web3.isConnected())
console.log("not connected");
else
console.log("connected");
}
A time out msg appears. I read about the
var Web3 = require('web3');
But when i add this line i also get a error msg for missing modules.
How can i get this run?