diff options
author | Pjotr Prins | 2016-10-06 14:27:17 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-10-06 14:27:17 +0000 |
commit | 94f7e2494f5e48b12ae10c0bf46ebc2367b0eecc (patch) | |
tree | a3e3989d0817e63cd6df0ef7d93b50e659c8288f /wqflask/runserver.py | |
parent | bd35fd6430e5b8b88fd3a7b8afa933d2b0f20b4e (diff) | |
parent | 416363b3f8940d145d8aec076865b167e78705d9 (diff) | |
download | genenetwork2-94f7e2494f5e48b12ae10c0bf46ebc2367b0eecc.tar.gz |
Merge branch 'master' of github.com:genenetwork/genenetwork2 into mechanize
Diffstat (limited to 'wqflask/runserver.py')
-rw-r--r-- | wqflask/runserver.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/wqflask/runserver.py b/wqflask/runserver.py index 12ec904e..0342b7ad 100644 --- a/wqflask/runserver.py +++ b/wqflask/runserver.py @@ -16,34 +16,37 @@ GREEN = '\033[92m' BOLD = '\033[1m' ENDC = '\033[0m' -logger.info("GN2 is running. Visit %shttp://localhost:5003/%s" % (BLUE,ENDC)) - import os app.config['SECRET_KEY'] = os.urandom(24) -from utility.tools import WEBSERVER_MODE +from utility.tools import WEBSERVER_MODE,get_setting_int + +port = get_setting_int("SERVER_PORT") + +logger.info("GN2 is running. Visit %shttp://localhost:%s/%s" % (BLUE,port,ENDC)) werkzeug_logger = logging.getLogger('werkzeug') if WEBSERVER_MODE == 'DEBUG': app.run(host='0.0.0.0', - port=app.config['SERVER_PORT'], + port=port, debug=True, - use_debugger=True, + use_debugger=False, threaded=False, + processes=0, use_reloader=True) elif WEBSERVER_MODE == 'DEV': werkzeug_logger.setLevel(logging.WARNING) app.run(host='0.0.0.0', - port=app.config['SERVER_PORT'], + port=port, debug=False, use_debugger=False, threaded=False, processes=0, use_reloader=True) -else: #production mode +else: # staging/production modes app.run(host='0.0.0.0', - port=app.config['SERVER_PORT'], + port=port, debug=False, use_debugger=False, threaded=True, |