diff --git a/main.py b/main.py index 0f42c3b..b026914 100644 --- a/main.py +++ b/main.py @@ -7,11 +7,12 @@ app = Flask(__name__) # ----- Config ----- DB_PATH = os.environ.get("SPLITBUDDY_DB", "splitbuddy.db") -CURRENCY = "₪" +CURRENCY = os.environ.get("SPLITBUDDY_CURRENCY", "₪") PERSON_A = os.environ.get("SPLITBUDDY_ME", "Me") # you PERSON_B = os.environ.get("SPLITBUDDY_ROOMIE", "Idan") # roommate -DEFAULT_A_SHARE_PCT = 66.6667 # <-- you pay 2/3 by default 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", 42069) # ----- DB helpers ----- def get_db() -> sqlite3.Connection: @@ -396,4 +397,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) \ No newline at end of file + app.run(debug=True, port=WEBAPP_PORT) \ No newline at end of file