mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-24 04:21:12 +00:00
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
|
||
|
)
|
||
|
)
|
||
|
}
|
||
|
)
|