Run ganache
cli, to start a local ethereum blockchain.
Run truffle deploy
to deploy contract on the local blockchain.
Run truffle test
to test the deployed contract.
- Change MetaMask network to localhost.
- Copy a private key from the available list, diplayed by
ganache
cli. - In MetaMask, import a new account with the previously copied private key. Now you have some ETH, and you can interact with the application.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
and connect the MetaMask account to the application.
To use localStorage instead of Ethereum contract, modify the provider definition of TodoListService
in app.module.ts
to use the correct service class.