Exemplo n.º 1
0
from cmservice.service.wsgi import create_app

app = create_app()

if __name__ == '__main__':
    import ssl

    context = None
    if app.config['SSL']:
        context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
        context.load_cert_chain(app.config['SERVER_CERT'], app.config['SERVER_KEY'])

    print('CMservice running at %s:%s' % (app.config['HOST'], app.config['PORT']))
    app.run(host=app.config['HOST'], port=app.config['PORT'], debug=app.config['DEBUG'],
            ssl_context=context)
Exemplo n.º 2
0
 def create_test_client(self, app_config, cert_and_key):
     self.app = create_app(config=app_config).test_client()
     self.signing_key = RSAKey(key=rsa_load(cert_and_key[1]), alg='RS256')
Exemplo n.º 3
0
 def create_test_client(self, app_config, cert_and_key):
     self.app = create_app(config=app_config).test_client()
     self.signing_key = RSAKey(key=rsa_load(cert_and_key[1]), alg='RS256')
Exemplo n.º 4
0
def app(app_config):
    return create_app(config=app_config)