Create 开发模式调试说明.md

pull/122/head
StarsL.cn 1 year ago committed by GitHub
parent f26c6d2164
commit 76f6e779c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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. 访问前端端口.
Loading…
Cancel
Save