read map from config file

This commit is contained in:
quantulr
2024-01-30 17:25:58 +08:00
parent 4e62811f16
commit fca55c5cb8
12 changed files with 46 additions and 114 deletions

View File

@ -1,10 +1,8 @@
import asyncio
import json
from typing import Dict
from redis import asyncio as aioredis
import uvicorn
from fastapi import FastAPI, BackgroundTasks, UploadFile
from fastapi import FastAPI, BackgroundTasks
app = FastAPI()
@ -27,7 +25,7 @@ async def event_rcv(data: dict, background_tasks: BackgroundTasks):
def run_app():
uvicorn.run("main:app", host="0.0.0.0", port=8000)
uvicorn.run(app=app, host="0.0.0.0", port=8000)
if __name__ == "__main__":