Add direct uvicorn server run and adjust Docker port mapping

This commit is contained in:
vvzvlad
2025-02-02 01:22:37 +03:00
parent d1ae60a14c
commit 79f6db9839
2 changed files with 11 additions and 1 deletions
+9
View File
@@ -28,6 +28,15 @@ app = FastAPI(
lifespan=lifespan
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(
"api_server:app",
host=settings["api_host"],
port=settings["api_port"],
reload=False
)
@app.get("/html/{channel}/{post_id}", response_class=HTMLResponse)
async def get_post_html(channel: str, post_id: int):
try: