34 lines
868 B
Python
34 lines
868 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.
|
|
# Exclude directories that should not trigger reloads to prevent
|
|
# infinite loops caused by log file writes.
|
|
uvicorn.run(
|
|
"src.server.fastapi_app:app",
|
|
host="127.0.0.1",
|
|
port=8000,
|
|
reload=True,
|
|
reload_excludes=[
|
|
"logs/*",
|
|
"data/*",
|
|
"Temp/*",
|
|
"__pycache__/*",
|
|
"*.log",
|
|
"*.json",
|
|
"*.jsonl",
|
|
],
|
|
log_config=log_config,
|
|
)
|