Repository files navigation truffle3-frontend-example
In order to build and run the frontend code LOCALLY , run
yarn install or npm install depending on your preference
make sure you have testrpc running , and change truffle.js to point to that network. e.g. localhost:8545.
truffle compile to create the json contract artifacts
truffle migrate to deploy the contracts onto the network
change the web3 provider in app/main.js to point to the testrpc server.
npm run build to compile the javascript and html assets into the build folder
truffle serve to serve the assets in the build folder
navigate to the host and port that truffle is serving (default, localhost:8080) in order to see the served assets
In order to build and run the frontend code IN DOCKER , run
docker-compose -f docker/docker-compose.yml up -d
once the container starts, find the hash of the truffle3_container service and run docker attach <hash>
yarn install or npm install depending on your preference
change truffle.js to point to that network. this is testrpc:8545 from inside the container
truffle compile to create the json contract artifacts
truffle migrate to deploy the contracts onto the network
change the web3 provider in app/main.js to point to the testrpc server. !! this will be localhost:7000 !!
npm run build to compile the javascript and html assets into the build folder
truffle serve to serve the assets in the build folder
navigate to localhost:7001/index.html in your browser to see the served assets
Use the webpack hotloader to sense when contracts or javascript have been recompiled and rebuild the application
About
Frontend example using truffle v3
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.