milingo
6/15/2017 - 2:48 PM

sockets_client.js

<script src="/socket.io/socket.io.js"></script>
<script>
  const socket = io('http://localhost:3000');
  socket.on('tic', (data) => {
    console.log(data);

    data.seconds++;
    socket.emit('tac', data);
  });
</script>