Create standalone WebSocket server using tornado (Python)

How to create a standalone WebSocket server using python and JavaScript.

Updating data on the web without refreshing the page is ideal for many applications. Here are few examples

  1. Real-time data graphs
  2. Election results
  3. Baseball scoreboard
  4. Chat app