heroku-python / flask-sockets

[DEPRECATED] Alternative: https://github.com/miguelgrinberg/flask-sock
MIT License
1.74k stars 164 forks source link

Is it possible to run a flask-sockets server in a thread? #13

Closed nickponline closed 8 years ago

nickponline commented 10 years ago

I currently run a flask server in a thread using:

app = flask.Flask(name) dispatcher = wsgiserver.WSGIPathInfoDispatcher({'/': app}) server = wsgiserver.CherryPyWSGIServer(('0.0.0.0', 8000), dispatcher) server_thread = threading.Thread(target=server.start) server_thread.daemon = True server_thread.start()

I would like to add a socket route to this server and continue to run it it a thread instead of with gunicorn? Is this possible?

kennethreitz commented 8 years ago

Not that I know of.