From b83b20f81051daaa0db08d1960515c94914502ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Tue, 14 Mar 2023 10:41:05 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=90=88=E7=90=86=E6=80=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郝先瑞 <1490493387@qq.com> Former-commit-id: ae3bc212061a80a977f5d142d0c387df01d491fc --- README.md | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 6fb0ffa0..e635c77b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,7 @@

- - - - - - + + + @@ -86,21 +83,17 @@ pnpm install # 项目运行 pnpm run dev + +# 项目打包 +pnpm run build:prod + ``` ## 项目部署 -- 打包项目 - - ``` - pnpm run build:prod - ``` - - 生成的静态文件位于项目根目录 `dist` 文件夹下 - - 上传文件 - 创建 `/mnt/nginx/html` 目录,将打包生成 `dist` 下的所有文件拷贝至此工作目录下 + 将打包生成在 `dist` 目录下的文件拷贝至 `/usr/share/nginx/html` 目录 - nginx.cofig 配置 @@ -110,11 +103,11 @@ pnpm run dev server_name localhost; location / { - root /mnt/nginx/html; + root /usr/share/nginx/html; index index.html index.htm; } - # 代理转发 prod-api 请求至 vapi.youlai.tech + # 代理转发 prod-api 标识至 vapi.youlai.tech location /prod-api/ { proxy_pass http://vapi.youlai.tech/; } @@ -124,18 +117,15 @@ pnpm run dev ## 接口文档 -**线上接口** - - 接口调用地址:[vapi.youlai.tech](http://vapi.youlai.tech) - 接口文档地址:[vue3-element-admin 在线接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5/api-65851240) -**本地接口** +## 本地接口 > 默认使用线上接口,你可以通过以下步骤完成本地接口环境搭建: 1. 获取基于 `Java 、SpringBoot` 开发的后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git) 源码 ; 2. 根据后端工程说明文档 [README.md](https://gitee.com/youlaiorg/youlai-boot#%E9%A1%B9%E7%9B%AE%E8%BF%90%E8%A1%8C) 完成本地启动; - 3. 替换 [vite.config.ts](vite.config.ts) 的代理目标地址 [vapi.youlai.tech](vapi.youlai.tech) 为本地的 [localhost:8989](localhost:8989) 。 ## 关于我