Created
September 24, 2020 01:37
-
-
Save toxinu/cc3282171485950cf87d9e0e5e2bc338 to your computer and use it in GitHub Desktop.
blog/websocket-with-flask-and-gevent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| from gevent.pywsgi import WSGIServer | |
| from geventwebsocket.handler import WebSocketHandler | |
| from app import my_app | |
| if __name__ == '__main__': | |
| http_server = WSGIServer(('',5000), my_app, handler_class=WebSocketHandler) | |
| http_server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment