Example #1
0
def create_app():
    app = Server('microblog', MicroBlogLogic())
    app.config.from_object('bomb.mbsrv.conf.{}'.format(os.environ.get('ENV_NAME', 'dev')))
    app.debug = app.config['DEBUG']
    db.init_app(app)
    cache.init(app.config['REDIS_HOST'], app.config['REDIS_PORT'])
    return app
Example #2
0
def create_app():
    app = Flask(__name__)
    app.config.from_object('asura.conf.{}'.format(os.environ.get('ENV_NAME', 'dev')))
    app.debug = app.config['DEBUG']
    load_views(app, www_api)
    db.init_app(app)
    cache.init(app.config['REDIS_HOST'], app.config['REDIS_PORT'])
    return app
Example #3
0
def create_app():
    app = Server('microblog', MicroBlogLogic())
    app.config.from_object('bomb.mbsrv.conf.{}'.format(
        os.environ.get('ENV_NAME', 'dev')))
    app.debug = app.config['DEBUG']
    db.init_app(app)
    cache.init(app.config['REDIS_HOST'], app.config['REDIS_PORT'])
    return app
Example #4
0
def create_app():
    app = Flask(__name__)
    app.config.from_object('asura.conf.{}'.format(
        os.environ.get('ENV_NAME', 'dev')))
    app.debug = app.config['DEBUG']
    load_views(app, www_api)
    db.init_app(app)
    cache.init(app.config['REDIS_HOST'], app.config['REDIS_PORT'])
    return app