Ejemplo n.º 1
0
 def create_app(self):
     '''Start the wsgi application'''
     self.current_app = app.create_app(
         **{
             'SQLALCHEMY_DATABASE_URI': self.postgresql_url,
         })
     return self.current_app
Ejemplo n.º 2
0
 def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app(
         **{
             'SQLALCHEMY_DATABASE_URI': self.postgresql_url,
             'RESOLVER_GATEWAY_URL': '/{bibcode}/{link_type}/{url}',
         })
     return a
Ejemplo n.º 3
0
 def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app(
         **{
             'SQLALCHEMY_DATABASE_URI': self.postgresql_url,
             'SQLALCHEMY_ECHO': False,
             'TESTING': True,
             'PROPAGATE_EXCEPTIONS': True,
             'TRAP_BAD_REQUEST_ERRORS': True,
             'RESOLVER_GATEWAY_URL': '/{bibcode}/{link_type}/{url}',
         })
     return a
Ejemplo n.º 4
0
def get_app_config(key):
    opath = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    if opath not in sys.path:
        sys.path.insert(0, opath)

    # from resolversrv import app
    #
    # print 'Getting actual config for', key, app.config.get(key)
    # return app.config.get(key)
    from resolversrv import app as application
    app = application.create_app()

    with app.app_context() as c:
        print('Getting actual config for', key, app.config.get(key))
        return app.config.get(key)
 def create_app(self):
     self.current_app = app.create_app()
     return self.current_app
Ejemplo n.º 6
0
# -*- coding: utf-8 -*-
"""
    wsgi
    ~~~~

    entrypoint wsgi script
"""

from werkzeug.serving import run_simple
from resolversrv import app

application = app.create_app()

if __name__ == "__main__":
    run_simple('0.0.0.0',
               5000,
               application,
               use_reloader=True,
               use_debugger=True)