docs: fix h5-app dev proxy port and admin-web test mode note
- Correct h5-app DEV_API_TARGET example from 3000 to 3201, matching h5-app/.env and vite.config.ts (which both use 3201 as the dev proxy target for the backend API) - Update h5-app dev server inline comment to show :3201 consistently - Clarify that admin-web `npm test` (vitest) runs in watch/interactive mode by default; show `-- --run` flag for one-shot CI-style execution Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -185,7 +185,7 @@ OSS_REGION=oss-cn-beijing
|
||||
|
||||
```dotenv
|
||||
# 开发时 API 代理目标(Vite 代理,不会暴露在浏览器)
|
||||
DEV_API_TARGET=http://127.0.0.1:3000
|
||||
DEV_API_TARGET=http://127.0.0.1:3201
|
||||
|
||||
# 生产部署时如需子路径,设置此项,例如 /h5/
|
||||
VITE_BASE=/
|
||||
@@ -213,7 +213,7 @@ npm run dev # tsx watch,热重载,默认监听 :3000
|
||||
|
||||
# 终端 2:移动端 H5
|
||||
cd h5-app
|
||||
npm run dev # Vite dev server,默认 :5173,/v1 代理到 :3000(或 DEV_API_TARGET)
|
||||
npm run dev # Vite dev server,默认 :5173,/v1 代理到 :3201(或 DEV_API_TARGET)
|
||||
|
||||
# 终端 3:管理后台
|
||||
cd admin-web
|
||||
@@ -226,8 +226,8 @@ npm run dev # Vite dev server,默认 :5174,/v1 代理到 :3000(
|
||||
# 移动端 H5
|
||||
cd h5-app && npm test
|
||||
|
||||
# 管理后台
|
||||
cd admin-web && npm test
|
||||
# 管理后台(vitest 默认以 watch 模式运行;非交互环境使用 --run 一次性执行)
|
||||
cd admin-web && npm test -- --run
|
||||
|
||||
# 后端(需要完整 MySQL 环境与正确的 .env 配置)
|
||||
cd server && npm test
|
||||
|
||||
Reference in New Issue
Block a user