You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
758 B
29 lines
758 B
5 months ago
|
"""
|
||
|
ASGI config for iotBackEnd project.
|
||
|
|
||
|
It exposes the ASGI callable as a module-level variable named ``application``.
|
||
|
|
||
|
For more information on this file, see
|
||
|
https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/
|
||
|
"""
|
||
|
|
||
|
import os
|
||
|
import django
|
||
|
from channels.routing import get_default_application
|
||
|
from django.urls import path
|
||
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
||
|
from channels.auth import AuthMiddlewareStack
|
||
|
from django.core.asgi import get_asgi_application
|
||
|
import iot.routing
|
||
|
|
||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "iotBackEnd.settings")
|
||
|
django.setup()
|
||
|
|
||
|
application = ProtocolTypeRouter({
|
||
|
"http": get_asgi_application(),
|
||
|
"websocket":
|
||
|
URLRouter(
|
||
|
iot.routing.websocket_urlpatterns
|
||
|
)
|
||
|
})
|