初始版本

This commit is contained in:
z66
2025-12-26 13:42:22 +08:00
parent ddb90d6c20
commit b495bc1dca
43 changed files with 2179 additions and 20 deletions
+18 -13
View File
@@ -1,16 +1,21 @@
# 这是一个示例 Python 脚本。
"""
项目启动入口
用于开发环境快速启动应用
"""
import sys
import os
# 按 Shift+F10 执行或将其替换为您的代码。
# 按 双击 Shift 在所有地方搜索类、文件、工具窗口、操作和设置。
# 添加 backend 目录到 Python 路径
backend_dir = os.path.join(os.path.dirname(__file__), "backend")
if backend_dir not in sys.path:
sys.path.insert(0, backend_dir)
import uvicorn
def print_hi(name):
# 在下面的代码行中使用断点来调试脚本。
print(f'Hi, {name}') # 按 Ctrl+F8 切换断点。
# 按装订区域中的绿色按钮以运行脚本。
if __name__ == '__main__':
print_hi('PyCharm')
# 访问 https://www.jetbrains.com/help/pycharm/ 获取 PyCharm 帮助
if __name__ == "__main__":
uvicorn.run(
"app.main:app",
host="0.0.0.0",
port=8000,
reload=True, # 开发环境自动重载
)