Answer the question
In order to leave comments, you need to log in
websocket + tornado + flask. How to use on sale?
Hello.
Raised the application flag. I launched it under a tornado locally. I use a handler to work with websocket. To run, I simply execute some code to run. The actual code to run:
from app.websocket.handler import WSHandler
from tornado.wsgi import WSGIContainer
from tornado.web import Application, FallbackHandler
from tornado.ioloop import IOLoop
from app import app
if __name__ == '__main__':
wsgi_app = WSGIContainer(app)
application = Application([
(r'/echo', WSHandler),
(r'.*', FallbackHandler, dict(fallback=wsgi_app))
])
application.listen(5000)
IOLoop.instance().start()
Answer the question
In order to leave comments, you need to log in
Everything is very simple:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question