From 18f958be04af021646f7278300a1cf4b4980d14b Mon Sep 17 00:00:00 2001 From: lza_menace Date: Wed, 8 Nov 2023 18:27:53 -0800 Subject: [PATCH] update defaults --- lwsadmin/lws/app.py | 2 +- lwsadmin/lws/config.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lwsadmin/lws/app.py b/lwsadmin/lws/app.py index b839988..129aa1d 100644 --- a/lwsadmin/lws/app.py +++ b/lwsadmin/lws/app.py @@ -1,4 +1,4 @@ from lws.factory import create_app from lws import config -run = create_app().run(host=config.HOST) +run = create_app().run(host=config.HOST, port=config.PORT) diff --git a/lwsadmin/lws/config.py b/lwsadmin/lws/config.py index ea25c0a..c6c837c 100644 --- a/lwsadmin/lws/config.py +++ b/lwsadmin/lws/config.py @@ -7,10 +7,11 @@ if DEBUG: load_dotenv() HOST = env.get("HOST", "127.0.0.1") +PORT = env.get("PORT", 5000) TEMPLATES_AUTO_RELOAD = True QUART_ENV = env.get("QUART_ENV", "development") SECRET_KEY = env.get("SECRET_KEY", token_urlsafe(12)) -SERVER_NAME = env.get("SERVER_NAME", "http://127.0.0.1:5000") +SERVER_NAME = env.get("SERVER_NAME", f"127.0.0.1:${PORT}") QUART_AUTH_DURATION = int(env.get('QUART_AUTH_DURATION', 60 * 60)) # 1 hour # LWS