def create_route(app, engineio_server, engineio_endpoint):
    """This function sets up the engine.io endpoint as a route for the
    application.

    Note that both GET and POST requests must be hooked up on the engine.io
    endpoint.
    """
    app.add_route(engineio_server.handle_request, engineio_endpoint,
        methods=['GET', 'POST', 'OPTIONS'])
    try:
        app.enable_websocket()
    except AttributeError:
        pass
