Part 2

In another Terminal window/tab, run ganache-cli to start a local blockchain.

And then, in the original tab, run the following:

  1. truffle compile to compile your contracts.
  2. truffle migrate to deploy those contracts to the network.
  3. ng serve to start your application.
  4. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
  5. Make sure there are no errors in browser console.
You can also run npm run compile-start to run the first three steps automatically. Since you have ganache-cli running, make sure MetaMask is switched off as this could cause problems with web3 being set correctly.

On http://localhost:4200/, you should see the following screen:

If you look in app.html in the src/app ...

Get Truffle Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.