Create the DB
This commit is contained in:
parent
3441d17b95
commit
295e05317a
@ -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.",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user