Skip to content

Latest commit

 

History

History
executable file
·
81 lines (47 loc) · 2.62 KB

README.md

File metadata and controls

executable file
·
81 lines (47 loc) · 2.62 KB

InternetComputer - Rust + Next.js Template

This is a template for creating a Next.js app with a Rust backend that can be deployed to the Internet Computer.

Alt text

Getting Started

  1. Install the DFINITY Canister SDK
  2. Install Node.js
  3. Install Rust

Running Locally

Installing dependencies:

  1. Run yarn install or npm install it will run the following commands:

    Install Node.js dependencies:

  • Run yarn install or npm install

    For extract candid definition from canister WASM:

  • Run yarn candid:install or npm run candid:install

    For transforming Wasm canisters running on the Internet Computer:

  • Run yarn ic-wasm:install or npm run ic-wasm:install

Running Local Internet Computer:

  1. Run yarn dfx:start or npm run dfx:start

Deploying to the Local Internet Computer:

  1. Run yarn deploy or npm run deploy

Running Next.js app:

  1. Run yarn dev or npm run dev
  2. Open http://localhost:3000 in your browser

Deploying to the Internet Computer

  1. Run yarn deploy --network=ic to deploy the canisters to the Internet Computer

Notes

  • 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

Other Branches

  • Motoko + Next.js Template: motoko

motoko

motoko_todo

  • RadixUI + Rust + Next.js Template: radix-ui

radix-ui

stable_memory

Resources