This is a template for creating a Next.js app with a Rust backend that can be deployed to the Internet Computer.
- Install the DFINITY Canister SDK
- Install Node.js
- Install Rust
Installing dependencies:
-
Run
yarn install:all
ornpm run install:all
it will run the following commands:Install Node.js dependencies:
-
Run
yarn install
ornpm install
For extract candid definition from canister WASM:
-
Run
yarn candid:install
ornpm run candid:install
For transforming Wasm canisters running on the Internet Computer:
-
Run
yarn wasm:install
ornpm run wasm:install
Running Local Internet Computer:
- Run
yarn dfx:start
ornpm run dfx:start
Deploying to the Local Internet Computer:
- Run
yarn deploy
ornpm run deploy
Running Next.js app:
- Run
yarn dev
ornpm run dev
- Open http://localhost:3000 in your browser
- Run
yarn deploy --network=ic
to deploy the canisters to the Internet Computer
- The Rust code is located in the
backend
directory - The Next.js code is located in the
src
directory - The canister configuration is located in the
dfx.json
file