first commit

This commit is contained in:
2026-01-09 19:14:41 +08:00
commit 9f3c96ce73
67 changed files with 9636 additions and 0 deletions

30
backend/run.py Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env python3
"""
SalesPipeline 應用程式啟動腳本
用於開發與生產環境
"""
import sys
import os
# 確保可以匯入 app 模組
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import uvicorn
from app.config import APP_HOST, APP_PORT, WORKERS, DEBUG
def main():
"""啟動應用程式"""
print(f"Starting SalesPipeline on {APP_HOST}:{APP_PORT}")
print(f"Workers: {WORKERS}, Debug: {DEBUG}")
uvicorn.run(
"app.main:app",
host=APP_HOST,
port=APP_PORT,
workers=WORKERS if not DEBUG else 1,
reload=DEBUG,
access_log=True,
)
if __name__ == "__main__":
main()