Files
012-kaopeilian/backend/start_backend.py
111 998211c483 feat: 初始化考培练系统项目
- 从服务器拉取完整代码
- 按框架规范整理项目结构
- 配置 Drone CI 测试环境部署
- 包含后端(FastAPI)、前端(Vue3)、管理端

技术栈: Vue3 + TypeScript + FastAPI + MySQL
2026-01-24 19:33:28 +08:00

31 lines
760 B
Python

#!/usr/bin/env python3
"""
考培练系统后端启动脚本
"""
import os
import sys
import uvicorn
from app.core.config import get_settings
def main():
"""启动后端服务"""
settings = get_settings()
print("🚀 启动考培练系统后端服务...")
print(f"📍 服务地址: http://{settings.HOST}:{settings.PORT}")
print(f"📚 API文档: http://{settings.HOST}:{settings.PORT}/docs")
print(f"🔧 调试模式: {'开启' if settings.DEBUG else '关闭'}")
print("-" * 50)
# 启动 uvicorn
uvicorn.run(
"app.main:app",
host=settings.HOST,
port=settings.PORT,
reload=settings.DEBUG,
log_level=settings.LOG_LEVEL.lower()
)
if __name__ == "__main__":
main()