mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
wip
This commit is contained in:
18
backend/tabby/asgi.py
Normal file
18
backend/tabby/asgi.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import django
|
||||
import os
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tabby.settings')
|
||||
django.setup()
|
||||
|
||||
from channels.auth import AuthMiddlewareStack
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
from .app.urls import websocket_urlpatterns
|
||||
|
||||
application = ProtocolTypeRouter({
|
||||
'http': get_asgi_application(),
|
||||
'websocket': AuthMiddlewareStack(
|
||||
URLRouter(websocket_urlpatterns),
|
||||
),
|
||||
})
|
||||
Reference in New Issue
Block a user