Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (8 sloc) 237 Bytes
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://127.0.0.1:3000/ctrl');
socket.on('message', function (data) {
console.log(data);
socket.emit('message', { my: 'data' });
});
</script>