Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Apr 1, 2024
1 parent 144632b commit 51bc4fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ async def widget(widget_name):
)
if __name__ == '__main__':
port = int(os.environ.get("ONBOARD_PORT", 9830))
if os.environ.get("FLASK_DEBUG", "False") == "True":
app.run(port=port, debug=True)
debug = bool(os.environ.get("FLASK_DEBUG", "False"))
print(f"Running on port {port} with debug={debug}")
if debug:
app.run(port=port, debug=debug)
else:
from hypercorn.config import Config
from hypercorn.asyncio import serve
Expand Down

0 comments on commit 51bc4fd

Please sign in to comment.