mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-05-22 19:31:19 +00:00
15 lines
362 B
Python
15 lines
362 B
Python
import uvicorn
|
|
from fastapi import FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Hello LiteyukiBot"}
|
|
|
|
|
|
async def run_app(**kwargs):
|
|
"""ASGI app 启动函数,在所有插件加载完后任务启动"""
|
|
config = uvicorn.Config(app, **kwargs, log_config=None)
|
|
server = uvicorn.Server(config)
|
|
await server.serve() |