重构后端服务架构并优化前端错误处理

This commit is contained in:
ylweng
2025-09-11 09:23:37 +08:00
parent 106bf8a841
commit 490de6bb2c
4 changed files with 59 additions and 5 deletions

View File

@@ -35,7 +35,9 @@
| 官网前端 | HTML5 + Bootstrap | 企业官网展示 |
| 管理后台 | Vue 3 + TypeScript + Element Plus + Vite + Pinia | Web管理后台 |
| 小程序端 | Uni-app + Vue 3 + TypeScript | 跨平台小程序矩阵 |
| 后端 | Node.js + Express.js | 微服务架构 |
| 后端 | |
| **Node版** | Node.js + Express.js | 微服务架构 |
| **Java版** | Spring Boot 3 + JPA | 模块化微服务架构 |
| 数据库 | MySQL 5.7 + Redis | 统一业务数据 + 缓存 |
| 文件存储 | MinIO/阿里云OSS | 视频文件存储 |
| 消息队列 | RabbitMQ | 异步任务处理 |

View File

@@ -114,21 +114,35 @@ sudo systemctl enable redis-server
### 3. 后端服务部署
#### 代码部署
#### Node.js版部署
```bash
# 克隆代码
cd /var/www/niumall
sudo git clone <repository-url> .
# 安装后端依赖
# 安装依赖
cd backend
sudo npm install --production
# 复制环境配置
# 环境配置
sudo cp .env.example .env.production
sudo vim .env.production
```
#### Java版部署
```bash
# 构建服务
cd /var/www/niumall/backend-java/user-service
sudo ./mvnw clean package
# 运行服务
sudo java -jar target/*.jar --spring.profiles.active=prod
# 或用Docker部署
sudo docker build -t user-service .
sudo docker run -d -p 8081:8081 user-service
```
#### 环境配置
```bash
# .env.production