2023-08-10 22:46:36 +02:00
|
|
|
from fastapi import Depends, FastAPI
|
|
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
from sqlalchemy.orm import Session
|
|
|
|
import crud
|
2023-08-12 00:20:51 +02:00
|
|
|
from api.api import api_router
|
2023-08-10 22:46:36 +02:00
|
|
|
|
|
|
|
app = FastAPI()
|
|
|
|
app.add_middleware(
|
|
|
|
CORSMiddleware,
|
|
|
|
allow_origins=["*"]
|
|
|
|
)
|
|
|
|
|
2023-08-12 00:20:51 +02:00
|
|
|
app.include_router(api_router)
|
2023-08-10 22:46:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
@app.get("/")
|
|
|
|
async def root():
|
|
|
|
return {"message": "Hello World"}
|