chore: document env files and configure proxy target

Add VITE_PROXY_TARGET to the example environment file and use it in
the Vite dev proxy configuration with a localhost fallback. Expand the
LLM development guide with env file loading order, version-control
rules, and variable descriptions. Also clean up ignored local tool
paths in .gitignore and remove duplicated README env examples.chore: document env files and configure proxy target

Add VITE_PROXY_TARGET to the example environment file and use it in
the Vite dev proxy configuration with a localhost fallback. Expand the
LLM development guide with env file loading order, version-control
rules, and variable descriptions. Also clean up ignored local tool
paths in .gitignore and remove duplicated README env examples.
This commit is contained in:
skytek_xinliang
2026-05-20 09:50:35 +08:00
parent e90d412956
commit 4d66718b05
6 changed files with 48 additions and 29 deletions
-9
View File
@@ -67,15 +67,6 @@ pnpm dev
cp .env.example .env
```
常用設定:
```env
VITE_API_BASE_URL=/service/api
VITE_SKIP_LOGIN=false
VITE_DEV_DEFAULT_USER_ID=
VITE_DEV_DEFAULT_PASSWORD=
```
`client.ts` 會優先使用 `VITE_API_BASE_URL`,否則預設 `/service/api`。開發模式下,Vite proxy 會將 `/service/*` 轉送到後端。
實際 `.env``.env.*.local` 不應提交。production API URL 應由使用專案自己的部署環境提供。