Skip to content

Commit

Permalink
fix: unicorn app (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai authored Aug 21, 2024
2 parents 8dc07c0 + 8176b14 commit f4a89b0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions server/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os

import uvicorn

from fastapi import FastAPI
from starlette.middleware.sessions import SessionMiddleware
Expand Down Expand Up @@ -49,8 +52,8 @@
app.include_router(task.router)


# if __name__ == "__main__":
# if is_dev:
# uvicorn.run("main:app", host="0.0.0.0", port=int(os.environ.get("PORT", "8080")), reload=True)
# else:
# uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "8080")))
if __name__ == "__main__":
if is_dev:
uvicorn.run("main:app", host="0.0.0.0", port=int(os.environ.get("PORT", "8080")), reload=True)
else:
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "8080")))

0 comments on commit f4a89b0

Please sign in to comment.