I have an existing app running uwsgi/flask behind nginx. I want to integrate websockets into the same app. Flask sockets looks promising, so I'm trying that.
Flask sockets briefly mentions running gevent-websocket, but no sample code is provided to integrate an existing app into this setup. I've also tried several combinations of gevent-websocket with my existing flask app, but I still keep getting 500s. Additionally, it would be nice if I could find out the nature of the 500s, but the errors don't show up in the uwsgi log, as they do for the existing flask app. So, if you have any debugging dips to show a tracedump, that'd be great.
Can anyone help me get a simple echo route working with this setup? Thanks in advance.
FYI, I'm currently using:
- uWSGI 1.0.3-debian
- python 2.7.3
- Flask 0.10.1
- nginx 1.4.3
- Flask Sockets 0.1
If you upgrade to uWSGI 2.0 you get websockets support for free without the need of additional frameworks and with gevent compatibility. More important you get a really fast implementation (suitable for gaming):
http://uwsgi-docs.readthedocs.org/en/latest/WebSockets.html