Aniworld/run_server.py
2025-10-25 17:54:18 +02:00

28 lines
794 B
Python

#!/usr/bin/env python3
"""
Startup script for the Aniworld FastAPI application.
This script starts the application with proper logging configuration.
"""
import uvicorn
from src.infrastructure.logging.uvicorn_config import get_uvicorn_log_config
if __name__ == "__main__":
# Get logging configuration
log_config = get_uvicorn_log_config()
# Run the application with logging.
# Only watch .py files in src/, explicitly exclude __pycache__.
# This prevents reload loops from .pyc compilation.
uvicorn.run(
"src.server.fastapi_app:app",
host="127.0.0.1",
port=8000,
reload=True,
reload_dirs=["src"],
reload_includes=["*.py"],
reload_excludes=["*/__pycache__/*", "*.pyc"],
log_config=log_config,
)