mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-27 22:11:10 +00:00
b4e2d6e874
uploaded the required files
22 lines
502 B
Python
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
|
|
)
|
|
)
|
|
}
|
|
)
|