Skip to Main Content
Truffle Quick Start Guide
book

Truffle Quick Start Guide

by Nikhil Bhaskar
June 2018
Beginner to intermediate content levelBeginner to intermediate
170 pages
3h 46m
English
Packt Publishing
Content preview from Truffle Quick Start Guide

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cryptosocial

Cryptosocial

Allen Taylor
Step into the Metaverse

Step into the Metaverse

Mark van Rijmenam

Publisher Resources

ISBN: 9781789132540Supplemental Content