()
return app
Configure the app w.r.t Flask-security, databases, loggers.
Configure the app w.r.t Flask-security, databases, loggers.
Configure the app w . r . t Flask - security databases loggers .
def create_app():
    """Configure the app w.r.t Flask-security, databases, loggers."""
    app = Flask(__name__)
    config_name = os.getenv('FLASK_CONFIGURATION', 'default')
    app.config.from_object(CONFIG[config_name])
    db.init_app(app)
    Security(app, user_datastore)
    CORS(app, headers=['Content-Type'])

    return app
def create_app ( ) : app = Flask ( __name__ ) config_name = os . getenv ( 'FLASK_CONFIGURATION' , 'default' ) app . config . from_object ( CONFIG [ config_name ] ) db . init_app ( app ) Security ( app , user_datastore ) CORS ( app , headers = [ 'Content-Type' ] ) return app