I'm trying to create an account through Node.js. This is my code:
export async function createNewAccount() {
var web3Instance = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
return web3Instance.eth.accounts.create();
}
But I'm getting the following error (from 'create' function):
Invalid JSON RPC response: undefined
I have installed web3.js in my project.
What other step have I missed?
BTW opening the browser on address "http://localhost:8545" returns 404. Is there anything I need to install in order to make it work? Is that the testrpc?
Notice that I want to work against the real blockchain, not a test one.
Edit:
As suggested by Karthikeyan, I downloaded and started geth. I don't know if it's actually working, it looks like this:
But I keep getting the same error when I try to create an account.