Truffle Pet Shop dapp with some enhancements and additional comments in code
Enhancements:
- Disable adopt button during
handleAdopted()
- Periodically call
markAdopted()
to immediately reflect adoption status
- Node.js (and NPM)
https://nodejs.org
- Truffle
$ npm install -g truffle
- Testrpc (or any ethereum client)
$ npm install -g ethereumjs-testrpc
- Run private ethereum network in a console
$ testrpc
- Open another console, clone this repo, enter and install node.js dependencies
$ npm install
- Compile smart contracts
$ truffle compile
- Migrate (deploy) smart contracts to our private network
$ truffle migrate
- Test the contracts
$ truffle test
- Run app
$ npm run dev
and open in browserhttp://localhost:3000