SHARE
TWEET

Untitled

a guest Oct 21st, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var io = require('socket.io').listen(8000)
  2.  
  3. io.sockets.on('connection', function (socket) {
  4.   socket.emit('news', { hello: 'world' });
  5.   socket.on('my other event', function (data) {
  6.     console.log(data);
  7.   });
  8. });
RAW Paste Data
Top