timer/public/js/main.js

9 lines
185 B
JavaScript

var socket = io.connect('http://localhost');
socket.on('status', function (data) {
$('#status').html(data.status);
});
$('#reset').click(function() {
socket.emit('reset');
});