初始化鸿蒙应用展示平台项目 - 前后端分离架构

This commit is contained in:
Nvex
2025-10-25 11:45:17 +08:00
commit c0f81dbbe2
92 changed files with 40210 additions and 0 deletions

40
backend/README.md Normal file
View File

@@ -0,0 +1,40 @@
# 后端 API 服务
基于 FastAPI 的鸿蒙应用展示平台后端服务。
## 安装
```bash
# 创建虚拟环境
python -m venv venv
source venv/bin/activate
# 安装依赖
pip install -r requirements.txt
```
## 配置
复制 `.env.example``.env` 并配置数据库连接:
```env
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=huawei_market
```
## 运行
```bash
python -m app.main
```
服务将在 http://localhost:8000 启动
## API 文档
启动服务后访问:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc