From 1eb6a530d31f0ff7d33f3bcf357046bbd0e28ab7 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 4 May 2016 09:27:01 -0700 Subject: [PATCH] WSGI-ASGI deploy notes --- docs/deploying.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/deploying.rst b/docs/deploying.rst index 79f9a64..13d31d7 100644 --- a/docs/deploying.rst +++ b/docs/deploying.rst @@ -194,3 +194,12 @@ that backs onto ASGI underneath:: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_test.settings") channel_layer = get_channel_layer() application = WsgiToAsgiAdapter(channel_layer) + +While this removes WebSocket support through the same port that HTTP is served +on, it still lets you use other channels features such as background tasks or +alternative interface servers (that would let you write consumers against +incoming emails or IRC messages). + +You can also use this method to serve HTTP through your existing stack +and run Daphne on a separate port or domain to receive only WebSocket +connections.