Dummy stupid example with Server Side Events (SSE) generated by Tornado.
Everything else handled by Flask
Vue.js
is used on the client side just for fun.
Launch the server:
# Use virtualenv and requirements.txt if posible
python3 server.py
Go to: http://localhost:8000/
Type any integer in the form field.
The routing:
[
(r'/', MainHandler),
(r'/events', EventSource, {'source': publisher}),
(r'/static/(.*)', web.StaticFileHandler, {'path': "./static"}),
(r".*", web.FallbackHandler, {'fallback': flask_handler}),
]
Vue.js code: /static/index.html