INNER CODE UNIT · Python
create_app
falconry/falcon · e2e-tests/server/app.py:17
def create_app() -> falcon.asgi.App[Request, Response]:
app = falcon.asgi.App()
# NOTE(vytas): E2E tests run Uvicorn, and the latest versions support ASGI
# HTTP/WSspec ver 2.4, so buffering on our side should not be needed.
app.ws_options.max_receive_queue = 0
hub = Hub()
app.add_route('/ping', Pong())
app.add_route('/sse', Events(hub))
app.add_route('/ws/{name}', Chat(hub))
app.add_static_route('/static', STATIC)
return app