We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff0c770 commit 0f9ea4aCopy full SHA for 0f9ea4a
1 file changed
server/app.py
@@ -76,5 +76,13 @@ def load_user(user_id: str):
76
77
restore_lightning_monitor()
78
79
+
80
+def env_flag(name: str, default: bool = False) -> bool:
81
+ value = os.environ.get(name)
82
+ if value is None:
83
+ return default
84
+ return value.strip().lower() in {"1", "true", "yes", "on"}
85
86
87
if __name__ == '__main__':
- app.run(host='0.0.0.0', port=8090, debug=True)
88
+ app.run(host='127.0.0.1', port=8090, debug=env_flag('ALLSKY_DEV_SERVER_DEBUG'))
0 commit comments