Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# The debug console executes Python on the host machine. Keep it true on your
# own laptop for hot reloading; set it false on anything anyone else can reach.
DASH_DEBUG=true
PORT=5050


# ---------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

# Load environemnt variables into globals
DASH_DEBUG = os.getenv("DASH_DEBUG", "true").strip().lower() == "true"
PORT = int((os.getenv("PORT", "5050") or "5050").strip())
MOCK_PLATFORM_HEADER = int(os.getenv("MOCK_PLATFORM_HEADER", "0") or 0)
MOCK_PLATFORM_SPACER = int(os.getenv("MOCK_PLATFORM_SPACER", "20") or 20)
LOG_MEMORY = os.getenv("LOG_MEMORY", "false").strip().lower() == "true"
Expand Down Expand Up @@ -134,5 +135,5 @@ def highlight_active_tab(pathname):


if __name__ == "__main__":
# Run the app. Set DASH_DEBUG in .env to toggle debug mode.
app.run(debug=DASH_DEBUG)
# Run the app. Set DASH_DEBUG and PORT in .env to configure.
app.run(debug=DASH_DEBUG, port=PORT)
Loading