aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2019-02-18 09:39:41 +0000
committerPjotr Prins2019-02-18 11:29:53 +0000
commit496759ad08efb02b4268ea7f3bbb7905974237e9 (patch)
tree0a2609f50825c0d401b6c8232c1e9b576f159b4e /wqflask
parent2a33ac494aecbe43b54f79afefae7b7d7c362d6c (diff)
downloadgenenetwork2-496759ad08efb02b4268ea7f3bbb7905974237e9.tar.gz
Updated installation instructions and SERVER_PORT for single flask server
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')