Setting up an Ethereum development environment
Follow these instructions to obtain the Ethereum development tools and start up an Ethereum private local blockchain environment (primarily used to run/deploy your smart contract to a local blockchain).
Installing Truffle
Open up the command line and run the following command:
npm install -g truffle
Installing Ganache
Open up the command line and install Ganache's command-line interface as follows:
npm install -g ganache-cli
Creating a Truffle project
To initialize a new DApp project, we can run the truffle init
command to initialize an empty Truffle project. This will create the DApp directory structure, including apps, contracts, and tests with Truffle configurations. Since Truffle Boxes provide many working templates, in our DApp example, we will use pet-shop box—a JQuery version of a JavaScript UI library—to develop our crowdfunding DApp example.Â
Create a folder called Crowdfunding
, open a command-line prompt, navigate to the  Crowdfunding
folder...