"""
ASGI config for website project.

It exposes the ASGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""

import os
from channels.routing import ProtocolTypeRouter
from django.core.asgi import get_asgi_application
from channels.routing import get_default_application
from channels.auth import AuthMiddlewareStack
from channels.routing import URLRouter
import chat.routing

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'website.settings')
application = ProtocolTypeRouter({
    "http": get_asgi_application(),
    "websocket": AuthMiddlewareStack(
        URLRouter(
            chat.routing.websocket_urlpatterns
        )
    ),
    # Just HTTP for now. (We can add other protocols later.)
})

application = get_default_application()

6e61d2ce60ee9c789b23d7f1d6f148de4d0f57b9
<mask token>

<mask token>
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'website.settings')
<mask token>

<mask token>
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'website.settings')
application = ProtocolTypeRouter({'http': get_asgi_application(),
    'websocket': AuthMiddlewareStack(URLRouter(chat.routing.
    websocket_urlpatterns))})
application = get_default_application()

<mask token>
import os
from channels.routing import ProtocolTypeRouter
from django.core.asgi import get_asgi_application
from channels.routing import get_default_application
from channels.auth import AuthMiddlewareStack
from channels.routing import URLRouter
import chat.routing
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'website.settings')
application = ProtocolTypeRouter({'http': get_asgi_application(),
    'websocket': AuthMiddlewareStack(URLRouter(chat.routing.
    websocket_urlpatterns))})
application = get_default_application()

"""
ASGI config for website project.

It exposes the ASGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""

import os
from channels.routing import ProtocolTypeRouter
from django.core.asgi import get_asgi_application
from channels.routing import get_default_application
from channels.auth import AuthMiddlewareStack
from channels.routing import URLRouter
import chat.routing

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'website.settings')
application = ProtocolTypeRouter({
    "http": get_asgi_application(),
    "websocket": AuthMiddlewareStack(
        URLRouter(
            chat.routing.websocket_urlpatterns
        )
    ),
    # Just HTTP for now. (We can add other protocols later.)
})

application = get_default_application()
