backend/config/asgi.py

15 lines
423 B
Python
Raw Normal View History

2023-02-18 23:51:02 +03:00
import os
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
django_asgi_app = get_asgi_application()
from exhauster_analytics.analytics.routing import websocket_urlpatterns
application = ProtocolTypeRouter(
{"http": django_asgi_app, "websocket": URLRouter(websocket_urlpatterns)}
)