diff --git a/docs/en/develop/dev-config.md b/docs/en/develop/dev-config.md index 2c0c7a62c..f5b8e10a7 100644 --- a/docs/en/develop/dev-config.md +++ b/docs/en/develop/dev-config.md @@ -44,8 +44,14 @@ Install dependencies and start the frontend ```bash pnpm install pnpm dev + +# If pnpm is not installed, you can also use npm to solve dependencies and start +npm install +npm run dev ``` +Then according to the output information, visit `http://127.0.0.1:3000` to view the standalone frontend page. + :::info When using `pnpm dev` to start locally, the environment variable `NEXT_PUBLIC_API_BASE_URL` will be automatically used by the frontend to ensure that the frontend can access the `5300` port of the locally running backend. diff --git a/docs/zh/develop/dev-config.md b/docs/zh/develop/dev-config.md index 0256ebfe3..da474b7bd 100644 --- a/docs/zh/develop/dev-config.md +++ b/docs/zh/develop/dev-config.md @@ -44,8 +44,14 @@ copy .env.example .env ```bash pnpm install pnpm dev + +# 若未安装pnpm,也可以使用npm来解决依赖并启动 +npm install +npm run dev ``` +然后根据输出信息,访问`http://127.0.0.1:3000`查看独立启动的前端页面。 + :::info 本地使用`pnpm dev`启动时,会携带`.env`中的环境变量`NEXT_PUBLIC_API_BASE_URL`,该变量会自动被前端使用,以确保前端可以访问到本地启动的后端的`5300`端口。