I first started geth: geth --syncmode "light" --rpc --rpcaddr 127.0.0.1 --rpccorsdomain "*" --datadir ~/eth_blocks/ and then used: geth account new.
I verified that there is a new entry in ~/Library/Ethereum/keystore/.
Then when i run this code:
var Web3 = require('web3')
var web3 = new Web3(new Web3.providers.HttpProvider('http://127.0.0.1:8545/'))
web3.eth.getAccounts(function(error, data) {
console.log(data)
})
It logs an empty array: []
Why is it not outputting what is in the keystore?