def create_app(test_config=None): # create and configure the app connexionApp = connexion.FlaskApp(__name__, specification_dir='openapi/', debug=True) app = connexionApp.app app.json_encoder = CustomJSONEncoder # custom json decoder # added to decode mongoDB id app.config.from_mapping(SECRET_KEY='dev_secret_3fkj$s', DATABASE_HOST="mongodb://*****:*****@app.route('/ping') def ping(): return 'Sharity app is up running :)' return app
def create_app(test_config=None): # create and configure the app connexionApp = connexion.FlaskApp(__name__, specification_dir='openapi/', debug=True) app = connexionApp.app app.json_encoder = CustomJSONEncoder # custom json decoder # added to decode mongoDB id app.config.from_mapping(SECRET_KEY='dev_secret_3fkj$s', DATABASE_HOST="mongodb://*****:*****@app.route('/static/<path:path>') def staticfile(path): return send_from_directory('static', path) # Ping route @app.route('/ping') def ping(): return 'Sharity app is up running :)' return app