This application was meant to relay some backend data (PHP, python, anything..) to a web interface instantly and refreshless via socket. POST on /notification route are forwarded on socket directly.
$ cp config.js.dist config.js
$ node server.js
<script src="https://cdn.socket.io/socket.io-1.3.7.js"></script>
<script>
// creating a new websocket
var socket = io.connect('http://localhost:8000/');
socket.on('notification', function (data) {
console.log(data);
});
</script>
$ curl -H "Content-Type: application/json" -X POST -d '{"warning":"investigate X"}' http://localhost:8000/notification