Ganache-CLI

Ganache-CLI is an Ethereum client that enables you to connect to a local blockchain for testing your decentralized application. You'll see more of Ethereum clients in Chapter 3, Choosing an Ethereum Client, but for now, just know that it allows us to connect to a local Ethereum blockchain (localhost:8545). Here, we are just using Ganache-CLI to create a local blockchain on localhost:8545.

Let's install ganache-cli with the following command:

npm install ganache-cli -g

Then, run it. In a separate terminal window/tab, run ganache-cli.

That's it. In the terminal that you ran ganache-cli, you should see a very familiar screen:

As you ...

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.