def run_socketio(script_info: ScriptInfo, host: str, port: int) -> None: app = script_info.load_app() if 'socketio' not in app.extensions: # flask-socketio is installed, but it isn't in this application # so we invoke Flask's original run command run_index = sys.argv.index('run_socketio') sys.argv = sys.argv[run_index:] return run_command() socketio = app.extensions['socketio'] socketio.run(app, host=host, port=port)
def run_server(): app = info.load_app() if 'socketio' not in app.extensions: # flask-socketio is installed, but it isn't in this application # so we invoke Flask's original run command run_index = sys.argv.index('run') sys.argv = sys.argv[run_index:] return run_command() socketio = app.extensions['socketio'] socketio.run(app, host=host, port=port, debug=debugger, use_reloader=False, log_output=debugger)