diff options
author | zsloan | 2019-02-18 10:41:13 -0600 |
---|---|---|
committer | GitHub | 2019-02-18 10:41:13 -0600 |
commit | 91df491997694f1482119add20bb93bdd2f9e69b (patch) | |
tree | cf7bfb141eb8c77ded68c2a1214589226f82e925 /wqflask | |
parent | 57d6d5c279a0386cd6e6ebd1c075c97487a3ee13 (diff) | |
parent | 6167e78f7c37b26f5226936e8eff0fe31be8691e (diff) | |
download | genenetwork2-91df491997694f1482119add20bb93bdd2f9e69b.tar.gz |
Merge pull request #356 from pjotrp/gn-testing
Updated instructions and SERVER_PORT for single flask server
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/runserver.py | 8 | ||||
-rw-r--r-- | wqflask/utility/tools.py | 1 |
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') |