Files
tabby-web/tabby/asgi.py
Eugene Pankov 3ff34b2618 wip
2021-07-06 23:45:52 +02:00

17 lines
440 B
Python

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