-
Install the following:
-
Install
hp-devkit:- Run the command:
npm i -g hpdevkit
- Run the command:
- Navigate to the
./todo-contract/directory. - Run
npm ito install the required Node.js packages (this step is only needed once). - Start the smart contract locally:
- Run
npm run startto build and execute the contract usinghp-devkit.
- Run
- Stop the
hp-devkitservice when done:- Run
hpdevkit stop.
- Run
Note: Docker must be running when you try to run the smart contract. If you encounter any issues with
hp-devkit, run the commandhpdevkit cleanto reset its state.
- Navigate to the
./todo-client/directory. - Run
npm ito install the required Node.js packages (this step is only needed once). - Execute the client application:
- Run
node todo-client.js.
- Run
Important: Ensure the smart contract is running before executing the client application to perform CRUD operations on the database.