Permalink
Switch branches/tags
Nothing to show
Find file Copy path
cabdce9 Jun 8, 2016
15 lines (13 sloc) 333 Bytes
<html>
<body>
<p id='server-time'></p>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io();
var el = document.getElementById('server-time');
socket.on('time', function(timeString) {
el.innerHTML = 'Server time: ' + timeString;
});
</script>
</body>
</html>