mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-10-05 12:16:24 +00:00
🔧 更新 Dockerfile 和 docker-compose 文件,添加配置目录并引入新依赖,重构配置加载功能
Some checks failed
Pytest API Testing / Pytes-API-Testing (push) Failing after 21s
Some checks failed
Pytest API Testing / Pytes-API-Testing (push) Failing after 21s
This commit is contained in:
20
liteyukibot/asgi/__init__.py
Normal file
20
liteyukibot/asgi/__init__.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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,
|
||||
))
|
Reference in New Issue
Block a user