parent
f26c6d2164
commit
76f6e779c0
@ -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…
Reference in new issue