diff --git a/本机运行文档.md b/本机运行文档.md index d1908701..5128852e 100644 --- a/本机运行文档.md +++ b/本机运行文档.md @@ -99,11 +99,14 @@ cd soul/dist && PORT=3006 node server.js | WECHAT_CERT_PATH / WECHAT_KEY_PATH | 证书路径 | certs/ 下 | | CORS_ORIGINS | 允许的跨域源 | 含 localhost、soul.quwanzhi.com | -### 3.2 soul-admin 的 API 地址 +### 3.2 soul-admin 的 API 地址(本地 vs 部署) -- 正式:`https://soulapi.quwanzhi.com` -- 开发:`https://souldev.quwanzhi.com`(打包时已写死) -- 本机联调:`/etc/hosts` 加 `127.0.0.1 soulapi.quwanzhi.com`,管理后台会访问本机 8080 +| 环境 | 配置文件 | API 地址 | +|------|----------|----------| +| 本地开发 `pnpm dev` | `.env.development` | `http://localhost:8080` | +| 部署构建 `pnpm build` | `.env.production` | `https://soulapi.quwanzhi.com` | + +**流程**:本地改代码用 `pnpm dev`,会自动请求本机 soul-api;部署时执行 `pnpm build`,产物自动用线上 API,无需改配置。 ---