mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-01 05:15:22 +08:00
doc: more detailed frontend debug comment
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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`端口。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user