python-scripts/scripts/Chat-App/Chatapp/asgi.py
Raj Saha b4e2d6e874
Upload Chat-App
uploaded the required files
2022-10-09 10:52:32 +05:30

22 lines
502 B
Python

ASGI_APPLICATION = 'ChatApp.asgi.application'
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ChatApp.settings')
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter , URLRouter
from chat import routing
application = ProtocolTypeRouter(
{
"http" : get_asgi_application() ,
"websocket" : AuthMiddlewareStack(
URLRouter(
routing.websocket_urlpatterns
)
)
}
)