asgi.py 615 B

1234567891011121314151617181920212223242526
  1. """
  2. WSGI config for archivebox project.
  3. It exposes the WSGI callable as a module-level variable named ``application``.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
  6. """
  7. from archivebox.config.django import setup_django
  8. setup_django(in_memory_db=False, check_db=True)
  9. from django.core.asgi import get_asgi_application
  10. from channels.routing import ProtocolTypeRouter
  11. django_asgi_app = get_asgi_application()
  12. application = ProtocolTypeRouter(
  13. {
  14. "http": django_asgi_app,
  15. # Just HTTP for now. (We can add other protocols later.)
  16. }
  17. )