INNER CODE UNIT · Python

root

RMA-MUN/RAGNotebook · backend/main.py:74

async def root():
    return {"message": "Hello World"}


@app.get("/hello/{name}")
async def say_hello(name: str):
    return {"message": f"Hello {name}"}

@app.get('/health')
async def health_check():
    return {"message": "The service is healthy"}


@app.on_event("startup")
async def startup_event():
    """应用启动时初始化会话管理器"""
    # 初始化数据库表结构(自动创建/迁移)
    await init_db()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…