Run Ganache
ganache-cli
In a terminal, make sure you are in the root of the directory that contains the dapp and type:
truffle compile
Migrate the contract to the blockchain.
truffle migrate
Run the tests:
truffle test
-
Click the menu that shows "Main Network" and select Custom RPC
-
In the box titled "New RPC URL" enter http://127.0.0.1:8545 and click Save.
- Import one of ganache accounts into metamask using its private key.
npm run dev
The dev server will launch and automatically open a new browser tab containing your dapp.