Here, we will be doing some workflow setup so we can get started with developing.
Setting up the workflow
Requirements
The following are the things we will need for setting up the workflow:
- Google Chrome.
- MetaMask, which is a Chrome extension. We will use this to connect to and to test the blockchain.
- Node Package Manager (NPM).
- Truffle, which is our first framework. We will be using it to develop our first decentralized application.
- Ethereum-JS ganache-cli, which is a test blockchain.
Getting started
Follow these steps to set up the workflow:
- Get the NPM. It is part of Node.js. You can get it at www.npmjs.com/get-npm, as shown in the following screenshot:
Getting the NPM
- Select the latest version displayed on their web page:
- Install MetaMask. To download MetaMask, visit https://metamask.io/.
- Click on GET CHROME EXTENSION.
- Then click on Add to Chrome.
- The preceding tool that we will be used to test our blockchain applications. Once you've installed it, a new tab will open up with a video explaining in depth how to use it and what it is.
- It is important for you to remember during this book that you can connect to the main network as well as three test networks, but you can also set up your own network, your own blockchain, and run on that. The following screenshot shows this:
MetaMask Main Network
- Install the Ethereum blockchain simulator called ganache-cli.
- This can be done as explained in the following screenshot:
Command to install Ethereum blockchain simulator
- You can install this as a node package by just copying this command and pasting it in your terminal. Once you've pasted it in your terminal, it will start installing, as shown here:
Installing Ethereum Simulator
Once that is done, it will tell you that it has succeeded; quit this for now because I have already reinstalled this. You can go ahead and verify it by typing ganache-cli into your Command Prompt and verifying that it runs. The following will be the output you will get if you have installed the simulator correctly:
Ethereum Simulator
- Installing and downloading Truffle.
- Truffle also is a simple node package from truffleframework.com that you can install by copying and pasting a command into your terminal, as shown here:
Command for installing Truffle
- Once that's done installing, you can verify it by typing truffle, as shown in the following screenshot, and now you can use any of these commands:
Truffle
- You can use init to initialize a new project, which we will be doing in the next chapter. Hence, we have successfully completed the installation.