Skip to main content

Quick Start

Prerequisites

  • Pnpm version 8 or above;
  • Node.js version 20 or above;
Tip

If your local Pnpm and Node.js versions meet the requirements, you can skip steps 1 and 2.

1. Install Pnpm

curl -fsSL https://get.pnpm.io/install.sh | sh -

Refer to the Pnpm Installation Documentation.

2. Install Node

# Install the LTS version of Node.js
pnpm env use --global lts

Refer to the Pnpm Node.js Environment Management Documentation.

3. Clone the Repository

Generate an SSH Key (skip if you already have one):

# Press "Enter" for all prompts
ssh-keygen -t rsa -C "your_email@milesight.com"

# Copy the public key
# Git Bash on Windows
cat ~/.ssh/id_rsa.pub | clip

# Mac
cat ~/.ssh/id_rsa.pub | pbcopy

Add the generated and copied SSH public key to Github under Settings -> SSH and GPG keys -> SSH Keys. Then, you can clone the project to your local machine without a password:

Clone the repository

git clone git@github.com:Milesight-IoT/beaver-iot-web.git

Navigate to the project directory

cd beaver-iot-web

Configure the commit username and email

Skip if already configured locally

Add --global parameter to modify globally

git config user.name xxx git config user.email xxx@milesight.com


## Start and Run

Execute the following commands:

```bash
# Navigate to the project directory
cd beaver-iot-web

# Install dependencies
pnpm install

# Start the project
pnpm run start
Note

The project is configured with a demo environment interface proxy by default. After starting, you can log in and operate using the demo account. If you need to switch to another environment (e.g., connecting to a local backend service), refer to the Environment Variables documentation for adjustments.