freeleaps-service-hub/apps/notification/webapi/providers/database.py
2024-10-30 07:22:26 -07:00

18 lines
413 B
Python

from app.notification.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