Allow running web app via ASGI

This commit is contained in:
Lance Edgar 2022-11-21 22:56:34 -06:00
parent 64a2b05c7a
commit 4a983f6ff0

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2020 Lance Edgar # Copyright © 2010-2022 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -91,3 +91,12 @@ def main(global_config, **settings):
under='pyramid_tm.tm_tween_factory') under='pyramid_tm.tm_tween_factory')
return pyramid_config.make_wsgi_app() return pyramid_config.make_wsgi_app()
def asgi_main():
"""
This function returns an ASGI application.
"""
from tailbone.asgi import make_asgi_app
return make_asgi_app(main)