diff --git a/kqueen/blueprints/api/test_user.py b/kqueen/blueprints/api/test_user.py index 39aa36bd..cc6ba840 100644 --- a/kqueen/blueprints/api/test_user.py +++ b/kqueen/blueprints/api/test_user.py @@ -40,8 +40,6 @@ def get_auth_headers(self): data=json.dumps(data), content_type='application/json') - print(config) - return {'Authorization': '{header_prefix} {token}'.format( header_prefix=config.get('JWT_AUTH_HEADER_PREFIX'), token=response.json['access_token'], diff --git a/kqueen/config/base.py b/kqueen/config/base.py index 1ec8fd92..d8a53b3b 100644 --- a/kqueen/config/base.py +++ b/kqueen/config/base.py @@ -5,6 +5,9 @@ class BaseConfig: DEBUG = False LOG_LEVEL = 'WARNING' + KQUEEN_HOST = '127.0.0.1' + KQUEEN_PORT = 5000 + # etcd settings # ETCD_HOST # ETCD_PORT diff --git a/kqueen/server.py b/kqueen/server.py index 04a450d6..089d094b 100644 --- a/kqueen/server.py +++ b/kqueen/server.py @@ -51,4 +51,5 @@ def create_app(config_file=None): def run(): logger.debug('kqueen starting') - app.run() + app.run(host=app.config.get('KQUEEN_HOST', '127.0.0.1'), + port=int(app.config.get('KQUEEN_PORT', 5000)))