Cannot connect my front-end to my back-end on a simple example.

notsosmartcontractnotsosmartcontract Posts: 2Member

I'm right now making some tests. I got a private ethereum testnet.
I start the node running:
geth --identity "node" --rpc --rpcport 8000 --rpccorsdomain "*" --datadir "myfolder" --port "30303" --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3" --autodag --networkid 10165211 --nat "any" --solc /usr/bin/solc console

Then i got my standard script:
var Web3 = require('web3');
var web3 = new Web3();
var provider = new web3.providers.HttpProvider('http://localhost:8000');
console.log("Error: not conected");
//code here
I got node.js installed.
I got web3 installed using npm install web3.
I checked the $NODE_PATH.
I checked the web3 modules are on the right node_modules folder.

But i still cannot connect.
Any idea?


Sign In or Register to comment.