diff --git a/backend/app/main.py b/backend/app/main.py index 81b4bf2..ef80afd 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -1,6 +1,15 @@ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware +from .providers.db_provider import create_db_and_tables + +from contextlib import asynccontextmanager + +@asynccontextmanager +async def lifespan(_app: FastAPI): + create_db_and_tables() + yield + app = FastAPI( title="Fair Housing API", description="Provides access to core functionality for the fair housing platform.",