This commit is contained in:
Jakub Miazek
2022-09-12 13:24:15 +02:00
parent 102771aee5
commit 9b1938c450
35 changed files with 50 additions and 50 deletions

24
app/main.py Normal file
View File

@@ -0,0 +1,24 @@
from fastapi import FastAPI
from app.api.nonsense import router as nonsense_router
from app.api.stuff import router as stuff_router
from app.api.shakespeare import router as shakespeare_router
from app.utils import get_logger
logger = get_logger(__name__)
app = FastAPI(title="Stuff And Nonsense API", version="0.4")
app.include_router(stuff_router)
app.include_router(nonsense_router)
app.include_router(shakespeare_router)
@app.on_event("startup")
async def startup_event():
logger.info("Starting up...")
@app.on_event("shutdown")
async def shutdown_event():
logger.info("Shutting down...")