I have a localhost blockchain node successfully working and my contract deploys OK using truffle. Geth works too. But when I try and access the node via React and the Chrome console when running React I am not getting anything meaningful. Even web3.eth.coinbase does not work.
Example code -
var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
var x = web3.eth.coinbase;
And x is undefined.
Here is the connection string -
geth --datadir ~/blockchain/mybc1 --rpc --rpcaddr "localhost" --port 8545 --rpcport 8545 --networkid 1234 console 2> consolemybc1.log
Has anyone any ideas about this?