mirror of
https://github.com/django/daphne.git
synced 2025-06-02 12:13:24 +03:00
WSGI-ASGI deploy notes
This commit is contained in:
parent
2219546a5d
commit
1eb6a530d3
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user