Most of the tutorials I have found so far connect a FrontEnd App (say, React) through the web3.js that gets injected by Metamask.

I have been asked to produce an NodeJS App that connects to a locally running Ganache instance. Is that possible? If so, can someone point me to a tutorial for this.


Yes, that's possible. Run the ganache-cli from the terminal that run test ethereum blockchain by default at localhost:8545. Now deploy your contracts on the ganache.

Now in the node.js application import web3 and with web3 object connect to the contract via contract address- web3.eth.contract(ABI).at(contractAddress), this will give the connection object in the node.js with which we can communicate with contract, make this in an node.js api which can be consumed in the frontend application which could be in react/angular.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.