Skip to content

yohanesgultom/pet-shop-tutorial

Repository files navigation

pet-shop-tutorial

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

Truffle Pet Shop

Prerequsites

  • Node.js (and NPM) https://nodejs.org
  • Truffle $ npm install -g truffle
  • Testrpc (or any ethereum client) $ npm install -g ethereumjs-testrpc

Setup

  1. Run private ethereum network in a console $ testrpc
  2. Open another console, clone this repo, enter and install node.js dependencies $ npm install
  3. Compile smart contracts $ truffle compile
  4. Migrate (deploy) smart contracts to our private network $ truffle migrate
  5. Test the contracts $ truffle test
  6. Run app $ npm run dev and open in browser http://localhost:3000