Skip to content

ICP-hub/merch-store

Repository files navigation

Merch Store

Ecommerce Project on ic

Run Locally

  1. Install dependencies
  npm install
  1. Start the dfx
  dfx start --clean --background
  1. Generate Candid definitions
  dfx generate
  1. Copy the generated files into the .dfx/local directory
  cp src/declarations/backend/* .dfx/local/canisters/backend/
  1. Deploy the project
dfx deploy
  dfx deploy --network ic
  • all commands for locally run
  dfx generate
  cp src/declarations/backend/* .dfx/local/canisters/backend/
  dfx deploy
  dfx deploy --network ic
  • deploy on network(for admin user)
  dfx generate
  cp src/declarations/backend/* .dfx/local/canisters/backend/
  dfx deploy
  dfx deploy --network ic

BACKEND:- Navigate to the backend canister to view the Candid UI

  http://127.0.0.1:4943/?canisterId=<canister-id>&id=<candid_ui_canister-id>

such as:

    http://127.0.0.1:4943/?canisterId=be2us-64aaa-aaaaa-qaabq-cai&id=bd3sg-teaaa-aaaaa-qaaba-cai

FRONTEND:- Start the local development server for the frontend

  npm run dev

Navigate to the frontend canister to view the React frontend

  http://127.0.0.1:4943/?canisterId=<canister-id>

such as:

  http://127.0.0.1:4943/?canisterId=bkyz2-fmaaa-aaaaa-qaaaq-cai

DFX SERVER STOP:- Stop the dfx(optional)

  dfx stop