You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 核心文件和文件夹
- server.js :服务器启动文件,运行后启动后端服务
- app.js :应用主配置文件,设置中间件、路由等
- config/ :配置文件夹
- db.js :数据库连接配置
- controllers/ :控制器文件夹
- userController.js :用户相关功能(如登录)
- productController.js :产品相关功能
- models/ :数据模型文件夹
- User.js :用户数据模型
- Product.js :产品数据模型
- routes/ :路由文件夹
- userRoutes.js :用户相关接口路由
- productRoutes.js :产品相关接口路由
- utils/ :工具函数文件夹
- jwt.js JWT令牌生成工具
- .env.example :环境变量示例文件
- package.json :项目依赖配置文件
## 技术栈
### 核心技术
- Node.js JavaScript 运行环境,用于运行后端代码
- Express Web 框架,用于构建 API 接口
- MySQL :关系型数据库,存储用户和产品数据
- Sequelize ORM 库,简化数据库操作
### 辅助工具
- JWT :用于生成和验证身份令牌
- CORS :处理跨域请求,允许前端访问后端接口
- dotenv :管理环境变量,如数据库连接信息
- nodemon :开发时自动重启服务器,提高开发效率