feat(日志): 实现定时日志清理功能并统一服务端口为19070
- 添加每小时定时清理项目控制台日志功能,保留最新1000条且不超过24小时 - 将所有服务端口统一调整为19070,包括后端API、Nginx配置和文档 - 优化前端日志显示,支持单行折叠和点击展开 - 更新相关测试用例和部署文档
This commit is contained in:
@@ -105,7 +105,7 @@ module.exports = {
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 19910,
|
||||
PORT: 19070,
|
||||
},
|
||||
error_file: './logs/pm2-error.log',
|
||||
out_file: './logs/pm2-out.log',
|
||||
@@ -187,14 +187,14 @@ pm2 status
|
||||
pm2 logs bls-project-console
|
||||
|
||||
# 测试健康检查接口
|
||||
curl http://localhost:19910/api/health
|
||||
curl http://localhost:19070/api/health
|
||||
```
|
||||
|
||||
#### 8.2 检查前端访问
|
||||
|
||||
在浏览器中访问:
|
||||
|
||||
- `http://localhost/` 或配置的域名
|
||||
- `http://localhost:19199/` 或配置的域名
|
||||
|
||||
#### 8.3 检查 API 代理
|
||||
|
||||
@@ -252,7 +252,7 @@ nginx -v
|
||||
1. 检查端口是否被占用:
|
||||
|
||||
```bash
|
||||
netstat -ano | findstr :19910
|
||||
netstat -ano | findstr :19070
|
||||
```
|
||||
|
||||
2. 检查 Redis 连接:
|
||||
@@ -297,13 +297,13 @@ nginx -v
|
||||
2. 检查 Nginx 代理配置:
|
||||
```bash
|
||||
# 确保 proxy_pass 指向正确的后端地址
|
||||
curl http://localhost:19910/api/health
|
||||
curl http://localhost:19070/api/health
|
||||
```
|
||||
|
||||
## 端口说明
|
||||
|
||||
- **19910**: 后端 API 服务端口
|
||||
- **80**: Nginx HTTP 服务端口
|
||||
- **19070**: 后端 API 服务端口
|
||||
- **19199**: Nginx HTTP 服务端口
|
||||
|
||||
## 注意事项
|
||||
|
||||
|
||||
Reference in New Issue
Block a user