0

I use truffle to unbox the express-js box (https://truffleframework.com/boxes/express-box). The code loads the web3 instance in server side which connects directly to ganache. Now I want to be able to connect to the front-end web3 instance (e.g.Metamask). The idea is to handle task like login, register, routing, ... using Express, and whenever there is a need to interact with the blockchain then the front-end will handle it.
How can I do it, based on the codebase provided by this box? Or what should be used? I would like to do the front-end in vanilla Javascript only, not using any framework.

  • Take care, I had some troubles with that box and it is outdated, so it is better to start a new node express and truffle project. In the server.js file down, try to change the web3 provider from ganache to the one, which is providerd by metamask and see if it is enough :/, if not then hope someone else could help you more :) see also this ethereum.stackexchange.com/questions/70206/… – Majd TL Jun 4 at 19:04

Your Answer

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

Browse other questions tagged or ask your own question.