Skip to content

Instantly share code, notes, and snippets.

@axilaris
Last active March 27, 2024 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axilaris/b1d26a9564cabd00ddaf2d854879e285 to your computer and use it in GitHub Desktop.
Save axilaris/b1d26a9564cabd00ddaf2d854879e285 to your computer and use it in GitHub Desktop.
const ws = new WebSocket('ws://localhost:8000/ws/notifications/');
application = ProtocolTypeRouter({
"websocket": URLRouter([
path("/ws/notifications/", consumers.NotificationConsumer.as_asgi()),
]),
})
App.js:59 WebSocket connection to 'ws://localhost:8000/ws/notifications/' failed:
App.js:71 WebSocket error Event
App.js:75 WebSocket closed CloseEvent
System check identified 1 issue (0 silenced).
March 27, 2024 - 20:17:02
Django version 4.1.5, using settings 'backend.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Forbidden: /api/user
WARNING:django.request:Forbidden: /api/user
[27/Mar/2024 20:17:07] "GET /api/user HTTP/1.1" 403 58
Forbidden: /api/user
WARNING:django.request:Forbidden: /api/user
[27/Mar/2024 20:17:07] "GET /api/user HTTP/1.1" 403 58
Not Found: /ws/notifications/
WARNING:django.request:Not Found: /ws/notifications/
Not Found: /ws/notifications/
WARNING:django.request:Not Found: /ws/notifications/
[27/Mar/2024 20:17:07,174] - Broken pipe from ('127.0.0.1', 51873)
[27/Mar/2024 20:17:07] "GET /ws/notifications/ HTTP/1.1" 404 2233
#ASGI_APPLICATION = "user_api.asgi.application"
#ASGI_APPLICATION = "backend.asgi.application"
#ASGI_APPLICATION = "backend/backend/asgi.py"
ASGI_APPLICATION = 'backend.routing.application'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment