aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/runserver.py8
-rw-r--r--wqflask/utility/tools.py1
2 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/runserver.py b/wqflask/runserver.py
index 5f41d04d..7c06356b 100644
--- a/wqflask/runserver.py
+++ b/wqflask/runserver.py
@@ -27,9 +27,11 @@ app_config()
werkzeug_logger = logging.getLogger('werkzeug')
+from utility.tools import WEBSERVER_MODE, SERVER_PORT
+
if WEBSERVER_MODE == 'DEBUG':
app.run(host='0.0.0.0',
- port=port,
+ port=SERVER_PORT,
debug=True,
use_debugger=False,
threaded=False,
@@ -38,7 +40,7 @@ if WEBSERVER_MODE == 'DEBUG':
elif WEBSERVER_MODE == 'DEV':
werkzeug_logger.setLevel(logging.WARNING)
app.run(host='0.0.0.0',
- port=port,
+ port=SERVER_PORT,
debug=False,
use_debugger=False,
threaded=False,
@@ -46,7 +48,7 @@ elif WEBSERVER_MODE == 'DEV':
use_reloader=True)
else: # staging/production modes
app.run(host='0.0.0.0',
- port=port,
+ port=SERVER_PORT,
debug=False,
use_debugger=False,
threaded=True,
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 86ef2e1e..8b2260f5 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -232,6 +232,7 @@ GN_VERSION = get_setting('GN_VERSION')
HOME = get_setting('HOME')
WEBSERVER_MODE = get_setting('WEBSERVER_MODE')
GN_SERVER_URL = get_setting('GN_SERVER_URL')
+SERVER_PORT = get_setting_int('SERVER_PORT')
SQL_URI = get_setting('SQL_URI')
LOG_LEVEL = get_setting('LOG_LEVEL')
LOG_LEVEL_DEBUG = get_setting_int('LOG_LEVEL_DEBUG')