mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-05-22 12:31:18 +00:00
Some checks failed
Pytest API Testing / Pytes-API-Testing (push) Failing after 21s
20 lines
363 B
Python
20 lines
363 B
Python
import asyncio
|
|
|
|
from fastapi import FastAPI
|
|
import hypercorn
|
|
import hypercorn.run
|
|
|
|
app = FastAPI()
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Hello LiteyukiBot"}
|
|
|
|
|
|
async def run_app():
|
|
"""liteyukibot入口函数
|
|
"""
|
|
hypercorn.run.serve(app, config=hypercorn.Config.from_mapping(
|
|
bind=["localhost:8000"],
|
|
workers=1,
|
|
)) |