Files
YunNanProject/Start.py

20 lines
663 B
Python
Raw Normal View History

2025-09-10 15:05:26 +08:00
# pip install fastapi uvicorn
from fastapi import FastAPI
2025-09-10 15:11:25 +08:00
from fastapi.staticfiles import StaticFiles
2025-09-10 15:05:26 +08:00
import uvicorn
2025-09-10 15:46:18 +08:00
from Controller.BigScreenController import router as bigscreen_router
2025-09-10 15:05:26 +08:00
# 创建 FastAPI 应用实例
app = FastAPI(title="云南教育决策研究服务系统", description="云南省教育数据分析和可视化平台")
2025-09-10 15:11:25 +08:00
# 挂载静态文件目录
app.mount("/static", StaticFiles(directory="static"), name="static")
2025-09-10 15:07:50 +08:00
# 包含大屏展示路由
app.include_router(bigscreen_router)
2025-09-10 15:05:26 +08:00
# 主程序入口
if __name__ == "__main__":
2025-09-10 19:49:14 +08:00
# 启动 FastAPI 应用,监听 8200 端口
uvicorn.run(app, host="0.0.0.0", port=8200)