From 11d8c83a0b7cc9d62f4d0d0b1fc52b7e561678d9 Mon Sep 17 00:00:00 2001 From: oscar Date: Thu, 23 Oct 2025 19:48:20 +0300 Subject: [PATCH] added host env --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ec9fbe9..44396ac 100644 --- a/main.py +++ b/main.py @@ -13,6 +13,7 @@ PERSON_B = os.environ.get("SPLITBUDDY_ROOMIE", "Idan") # roommate DEFAULT_ACTOR = os.environ.get("SPLITBUDDY_ACTOR", "anon") # who is using this device (optional) DEFAULT_A_SHARE_PCT = os.environ.get("SPLITBUDDY_DEFAULT_A_SHARE_PCT", 66.6667) # <-- you pay 2/3 by default WEBAPP_PORT = os.environ.get("SPLITBUDDY_WEBAPP_PORT", 5050) +WEBAPP_HOST = os.environ.get("SPLITBUDDY_WEBAPP_HOST", "0.0.0.0") # ----- Template filters ----- @app.template_filter('human_time') @@ -418,4 +419,4 @@ if __name__ == "__main__": os.makedirs(os.path.dirname(DB_PATH) or ".", exist_ok=True) with app.app_context(): init_db() - app.run(debug=True, port=WEBAPP_PORT) \ No newline at end of file + app.run(debug=True, port=WEBAPP_PORT, host=WEBAPP_HOST) \ No newline at end of file