Spaces:
Running
Running
File size: 533 Bytes
3777688 2471e68 b9a4f82 a2c1a36 3777688 a2c1a36 40fe67e a2c1a36 2471e68 a2c1a36 b9a4f82 a2c1a36 b9a4f82 3777688 a2c1a36 3777688 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
"""Entry point for running the FastAPI application."""
import os
import uvicorn
from dotenv import load_dotenv
from src.api.main import app
load_dotenv()
if __name__ == "__main__":
# Read port from environment variable, default to 8000 for FastAPI server
# (matches frontend proxy config and development scripts)
# Can be overridden: PORT=7860 python main.py
port = int(os.getenv("PORT", "8000"))
uvicorn.run(
"src.api.main:app",
host="0.0.0.0",
port=port,
reload=True,
)
|