import logging from apscheduler.schedulers.asyncio import AsyncIOScheduler from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from app.api.router import api_router from app.core.config import settings scheduler = AsyncIOScheduler() logger = logging.getLogger(__name__) logger.info(f"Starting app!!!") app = FastAPI( title=settings.PROJECT_NAME, version=settings.VERSION, openapi_url=f"{settings.API_VERSION_STR}/openapi.json", debug=True, ) # Set up CORS middleware app.add_middleware( CORSMiddleware, allow_origins=settings.BACKEND_CORS_ORIGINS, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/", response_class=HTMLResponse) async def root(): return """ EventSpace API

Welcome to EventSpace API

Explore the available endpoints and documentation:

OpenAPI Documentation """ app.include_router(api_router, prefix=settings.API_VERSION_STR) app.mount("/files", StaticFiles(directory=settings.DATA_FILES_DIR), name="static")