This demo shows how to use MigratoryData Client API for JavaScript. It has documented source code.
You can also open this example from other browser windows to see how messages are published back by the MigratoryData server to this client as well as to all clients subscribing to /server/status.