From 0f6fb134ddc850824e686bb6bf63f75558fc7dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=8B=A5?= Date: Sun, 8 Mar 2026 17:43:53 +0800 Subject: [PATCH] =?UTF-8?q?sync:=20=E5=A4=9A=E6=96=87=E4=BB=B6=20|=20?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0:=20=E6=9C=AC=E5=9C=B0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 本机运行文档.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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,无需改配置。 ---