freeleaps-service-hub/app/content/webapi/providers/database.py
2024-10-29 06:40:37 -07:00

18 lines
395 B
Python

from webapi.config.site_settings import site_settings
from beanie import init_beanie
from motor.motor_asyncio import AsyncIOMotorClient
def register(app):
app.debug = site_settings.DEBUG
app.title = site_settings.NAME
@app.on_event("startup")
async def start_database():
await initiate_database()
async def initiate_database():
#init your database here
pass