create mesh app and basic asgi websocket setup for communication
This commit is contained in:
parent
f51bc71799
commit
8af6bca51c
10 changed files with 63 additions and 0 deletions
16
src/c3nav/asgi.py
Normal file
16
src/c3nav/asgi.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import os
|
||||
|
||||
from channels.auth import AuthMiddlewareStack
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
from c3nav.urls import websocket_urlpatterns
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
|
||||
|
||||
application = ProtocolTypeRouter({
|
||||
"http": get_asgi_application(),
|
||||
"websocket": AuthMiddlewareStack(
|
||||
URLRouter(websocket_urlpatterns)
|
||||
),
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue