using flask-migrate with flask-script, flask-socketio and application factory using flask-migrate with flask-script, flask-socketio and application factory flask flask

using flask-migrate with flask-script, flask-socketio and application factory


Based on the comment by Miguel I found a way which works.

For some reason the following code does not work

manager.add_command("run", socketio.run(   flask.current_app,   host='127.0.0.1',   port=5000,   use_reloader=False))

But this actually works.

@manager.commanddef run():   socketio.run(flask.current_app,                host='127.0.0.1',                port=5000,                use_reloader=False)