daily pastebin goal
4%
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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top