Add example model, route and logic for development testing and boilerplate
This commit is contained in:
parent
f1cd1e8bfa
commit
cac002e3e6
11 changed files with 80 additions and 0 deletions
18
app/main.py
18
app/main.py
|
|
@ -0,0 +1,18 @@
|
|||
from fastapi import FastAPI
|
||||
|
||||
from app.config import settings
|
||||
from app.database import create_database
|
||||
from app.routers import example_route
|
||||
|
||||
app = FastAPI(
|
||||
title=settings.app_name,
|
||||
version=settings.app_version
|
||||
)
|
||||
|
||||
@app.on_event("startup")
|
||||
def startup():
|
||||
create_database()
|
||||
|
||||
app.include_router(
|
||||
example_route.router
|
||||
)
|
||||
Loading…
Reference in a new issue