From 76f6e779c0eb217f328c80cbcb8bb602c214cce2 Mon Sep 17 00:00:00 2001 From: "StarsL.cn" Date: Mon, 23 Oct 2023 23:33:26 +0800 Subject: [PATCH] =?UTF-8?q?Create=20=E5=BC=80=E5=8F=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E8=AF=B4=E6=98=8E.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/开发模式调试说明.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/开发模式调试说明.md diff --git a/docs/开发模式调试说明.md b/docs/开发模式调试说明.md new file mode 100644 index 0000000..64576e4 --- /dev/null +++ b/docs/开发模式调试说明.md @@ -0,0 +1,31 @@ +### 开发模式 +- python版本: <=3.10 +``` +python3 ./manager.py +``` +- nodejs版本: >=14 +``` +npm run dev +``` +- 建议部署nginx转发前后端:即可不修改前后端代码,直接启动前后端程序,访问nginx的端口即可. +``` +server { + listen 1026; + location /api/ { + proxy_pass http://127.0.0.1:2026; + } + location / { + proxy_pass http://127.0.0.1:9528; + } +} +``` +- 如果你不想部署nginx,直接使用前端转发方式访问TenSunS: + 1. 修改后端代码配置允许跨域 + ``` + https://github.com/starsliao/TenSunS/blob/main/flask-consul/manager.py + ``` + 2. 修改前端代码配置转发的后端地址 + ``` + https://github.com/starsliao/TenSunS/blob/main/vue-consul/src/utils/request-ops.js + ``` + 3. 访问前端端口.