File: index.html

package info (click to toggle)
node-http-server 14.1.1%2B~cs3.14.34-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,856 kB
  • sloc: javascript: 5,677; makefile: 8
file content (8 lines) | stat: -rw-r--r-- 231 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
<script src="/socket.io/socket.io.js"></script>
<script>
  var socket = io.connect('http://localhost');
  socket.on('news', function (data) {
    console.log(data);
    socket.emit('my other event', { my: 'data' });
  });
</script>