File size: 660 Bytes
4ef118d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python3
"""
Run script for Qurio Python backend.
Starts the FastAPI server with uvicorn.
"""

import os
import uvicorn

from src.config import get_settings

settings = get_settings()

# Enable Agno debug mode if requested
debug_agno = os.environ.get("DEBUG_AGNO", "0") == "1"
if debug_agno:
    import sys
    print(f"[DEBUG] DEBUG_AGNO enabled", file=sys.stderr)

if __name__ == "__main__":
    reload_enabled = os.environ.get("BACKEND_RELOAD", "1") == "1"
    uvicorn.run(
        "src.main:app",
        host=settings.host,
        port=settings.port,
        reload=reload_enabled,
        log_level="debug" if debug_agno else "info",
    )