Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (28 sloc) 872 Bytes
* Author: Gianluca Guarini
* Contact:
* Website:
* Twitter: @gianlucaguarini
<title>Push notification server</title>
<div id="container">Try to change your xml data to update this content</div>
<script src=""></script>
<script src=""></script>
// creating a new websocket
var socket = io.connect('http://localhost:8000');
// on every message recived we print the new datas inside the #container div
socket.on('notification', function (data) {
// convert the json string into a valid javascript object
var _data = JSON.parse(data);
$('time').html('Last Update:' + new Date());