Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit 6dc512a

Browse files
committed
Merge pull request #9 from mbildner/patch-1
Updates README.md to warn against using Flask dev server
2 parents 112ba57 + fadb971 commit 6dc512a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,26 @@ A custom Gunicorn worker is included to make deployment as friendly as possible:
4444
Production services are provided by `gevent <http://www.gevent.org>`_
4545
and `gevent-websocket <http://www.gelens.org/code/gevent-websocket/>`_.
4646

47+
4748
Anything that inserts ``wsgi.websocket`` into the WSGI environ is
4849
supported, but gevent-websocket is recommended.
4950

5051

52+
Development / Testing
53+
---------------------
54+
55+
Because the Werkzeug development server cannot provide the WSGI environ with
56+
a websocket interface, it is not possible to run a Flask app using the standard
57+
``app.run()``.
58+
59+
If you try to, Flask will still try to serve on all the specified routes, and
60+
throw a ``KeyError`` whenever a client tries to connect to a websocket route.
61+
62+
Instead, just use the included gunicorn worker (explained above), or anything that
63+
can insert ``wsgi.websocket`` into the WSGI environ.
64+
65+
66+
5167
WebSocket Interface
5268
-------------------
5369

0 commit comments

Comments
 (0)