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