18 lines
377 B
Python

from fastapi import FastAPI
from .routers import users, token
from .dependencies import user_add
app = FastAPI()
app.include_router(users.router)
app.include_router(token.router)
@app.on_event("startup")
async def startup_event():
user_add.add(username="Peter93", password="toto", roles="Admin")
@app.get("/")
async def root():
return {"message": "Hello World !"}