Skip to content

Instantly share code, notes, and snippets.

@agawish
Last active March 2, 2018 20:03
Show Gist options
  • Save agawish/af7147ca1799ab26e866dc62884e78a5 to your computer and use it in GitHub Desktop.
Save agawish/af7147ca1799ab26e866dc62884e78a5 to your computer and use it in GitHub Desktop.
Initialization of Survey Reward DApp
# Create DApp Directory
mkdir survey-reward-dapp
# Open DApp Directory
cd survey-reward-dapp
# Initialize the application using NPM (Follow through, or if you're happy with default just go with npm init -y
npm init
# Start by downloading Truffle (You can also install it globally by npm install -g truffle
npm install --save truffle
# Install Web3 as well
npm install --save web3
# Always a good practice to install zeppelin solidity contracts
npm install --save zeppelin-solidity
# Install .env for environment variable management
npm install --save dotenv
# Also our trustee ganache-cli (You can also install it globally as it can come handy)
npm install --save-dev ganache-cli
# Install a great linter and style enforcer for solidity (You can also use that globally)
npm install --save-dev solium
# Install the following for test coverage
npm install --save-dev solidity-coverage
# Initialize Truffle App (use truffle.cmd for window)
./node_modules/.bin/truffle init
# Initialize Solium
./node_modules/.bin/solium init
# We also need to create a sample .env file that inject environment variables would use (This file will be added to .gitignore and will remain local)
touch .env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment