fastapi-boilerplate/app/main.py
Finn Christiansen d8607212da
Some checks failed
Python formatting PEP8 / Python-PEP8 (push) Failing after 18s
added structured api endpoints and done some refactoring
2023-08-12 00:20:51 +02:00

18 lines
353 B
Python

from fastapi import Depends, FastAPI
from fastapi.middleware.cors import CORSMiddleware
from sqlalchemy.orm import Session
import crud
from api.api import api_router
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=["*"]
)
app.include_router(api_router)
@app.get("/")
async def root():
return {"message": "Hello World"}