INNER CODE UNIT · Python
make_app
gbtami/pychess-variants · server/server.py:55
def make_app(
db_client: AsyncMongoClient | None = None,
simple_cookie_storage: bool = False,
anon_as_test_users: bool = False,
with_openapi: bool | None = None,
) -> Application:
startup = StartupTimer(log, "make_app")
if with_openapi is None:
with_openapi = not is_test_run()
with startup.phase("create aiohttp application"):
app = web.Application()
with startup.phase("configure swagger + middleware"):
swagger = (
SwaggerDocs(
app,
validate=False,