A MQTT and WebSockets demonstration for Web of Things classes (CIn/UFPE).
node index.js
...and then open the index.html file on your browser. You should be able to subscribe and receive messages from the local MQTT broker about the topic you've chosen.