Files
department-api/README.md
huanglinhuan 01c7b2b673 修改路由
2025-12-08 18:26:55 +08:00

49 lines
925 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 通信技术部 - 后端API
## 技术栈
- Node.js
- Express
- JWT认证
- bcryptjs密码加密
## 安装依赖
```bash
npm install
```
## 运行项目
```bash
# 开发模式需要安装nodemon
npm run dev
# 生产模式
npm start
```
## 默认登录信息
- 用户名: `admin`
- 密码: `admin123`
## API接口
### 认证接口
- `POST /api/auth/login` - 用户登录
- `GET /api/auth/verify` - 验证token
### 机型接口(需要认证)
- `GET /api/aircraft/list` - 获取机型列表
- `GET /api/aircraft/:id` - 获取机型详情
### PDF资料接口需要认证
- `GET /api/pdf/aircraft/:aircraftId` - 获取指定机型的PDF资料
- `GET /api/pdf/list` - 获取所有PDF资料
- `GET /api/pdf/file/:id` - 获取PDF文件信息
## 环境变量
创建 `.env` 文件并设置:
```
PORT=3001
JWT_SECRET=your-secret-key-change-in-production
```