Esempio n. 1
0
def create_app():
    setup_logging()

    app = falcon.API(middleware=[CrossDomain(), JSONTranslator()], )

    app.add_error_handler(Exception, error_handler)

    _setup_routes(app)

    return app
def create_app():
    setup_logging()

    app = falcon.API(middleware=[CrossDomain()], )

    app.add_error_handler(Exception, error_handler)

    configure_routes(app)

    return app
Esempio n. 3
0
def create_app():
    setup_logging()

    # cors = CORS(allow_origins_list=['http://test.com:8080'])
    cors = CORS(allow_all_origins=True)

    app = falcon.API(
        middleware=[
            # CrossDomain(),
            # JSONTranslator()
            cors.middleware
        ], )

    app.add_error_handler(Exception, error_handler)

    # if this is the dev environment, clear the database when booted up
    if os.environ.get('ENV') == 'DEV':
        print('CLEARING DB . . .')
        engine = create_table()
        migrate(engine)

    _setup_routes(app)

    return app
Esempio n. 4
0
def configure(**overrides: Any):
    logging.getLogger("vyper").setLevel(logging.WARNING)
    setup_vyper(parser, overrides)
    setup_logging()
def configure():
    logging.getLogger("vyper").setLevel(logging.WARNING)
    setup_vyper(parser)
    setup_logging()
def configure():
    logging.getLogger("vyper").setLevel(logging.WARNING)
    setup_vyper(parser)
    setup_logging()