-
Fork the Repository:
- Fork the repository to your GitHub account.
-
Clone Your Fork:
git clone <your-fork-url>
-
Install Dependencies:
npm i -y
-
Install DFX:
-
It's recommended to use nvm and Node.js 20:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Restart your terminal and then run:
nvm install 18
Check the node version being used:
node --version
-
Install the dfx command line tools for managing ICP applications:
DFX_VERSION=0.16.1 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
Check the installation:
dfx --version
If encountering "dfx: command not found," add $HOME/bin to your path. Example:
echo 'export PATH="$PATH:$HOME/bin"' >> "$HOME/.bashrc"
-
-
Start the canister:
-
Run the following commands in the root directory:
dfx start --clean
-
-
Deploy the canister:
- In another terminal:
dfx deploy
-
Open the Deployed Link:
- Open the link generated by
dfx deploy
in your browser.
- Open the link generated by
-
Test Endpoints:
- Test all the endpoints from the browser UI.
Happy coding!