doc: more detailed frontend debug comment

This commit is contained in:
Junyan Qin
2025-09-29 10:21:55 +08:00
parent 628ec019fa
commit 2c70275830
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -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.
+6
View File
@@ -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`端口。