Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.59 KB

File metadata and controls

49 lines (33 loc) · 1.59 KB

Quickstart

Deploy a full-stack app to a local network in under 5 minutes.

Prerequisites: Node.js (LTS) is required for the installation commands below.

Windows users: This quickstart requires WSL (for Motoko) and Docker Desktop (for local networks). Install both first, then run all commands inside WSL.

Install

# icp-cli and ic-wasm (required)
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm

# Motoko toolchain (for Motoko projects)
npm install -g ic-mops

Alternative methods: See the Installation Guide for Homebrew, shell script, or other options.

Steps

# 1. Create a new project with Motoko backend + React frontend
icp new my-project --subfolder hello-world \
  --define backend_type=motoko \
  --define frontend_type=react \
  --define network_type=Default && cd my-project

# 2. Start a local network (runs in background)
icp network start -d

# 3. Build and deploy
icp deploy

# 4. Call your backend canister
icp canister call backend greet '("World")'

# 5. Stop the local network when done
icp network stop

You should see ("Hello, World!") — and after deploying, open the frontend URL shown in the output to see your app.

What's next?