Skip to content

Commit

Permalink
feat: integrate django channels into the project
Browse files Browse the repository at this point in the history
This will help the project integrate other non-http protocols such as websockets in the future thus making this a robust platform to serve metadata and receive data from IDR clients.
  • Loading branch information
kennedykori committed Oct 17, 2022
1 parent 7286402 commit 57c7d7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@

import os

from channels.routing import ProtocolTypeRouter
from django.core.asgi import get_asgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
# Initialize Django ASGI application early to ensure the AppRegistry
# is populated before importing code that may import ORM models.
django_asgi_app = get_asgi_application()

application = get_asgi_application()
application = ProtocolTypeRouter({"http": django_asgi_app})

0 comments on commit 57c7d7c

Please sign in to comment.