I've completed my truffle Dapp, the contracts are deployed to the Ropsten test network and my web code talks nicely to them, it works great from http://localhost:8080/ when I do an npm run dev.

I now want to put it onto a live webserver, still connected to Ropsten, no code changes, just the built code that is running on localhost in my browser.

How do I do a build for deployment to a webserver?

  • Did you do it? If yes, can you please answer the question? @kris – Pramesh Bajracharya Feb 8 '18 at 4:36
  • npm run build Builds the Dapp into /build – kris Feb 8 '18 at 7:37

$ npm run build

Builds the Dapp into /build
You may need to then also copy over static resources, like /images

(Thanks to : http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3)

  • @Down-voters - please provide a better answer if you have one – kris Nov 28 '17 at 3:15

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.