sockets.js 270 B

123456789101112
  1. const server = require('http').createServer();
  2. const io = require('socket.io')(server, {
  3. path: '/sockets',
  4. serveClient: false,
  5. // below are engine.IO options
  6. pingInterval: 10000,
  7. pingTimeout: 5000,
  8. cookie: false
  9. });
  10. server.listen(3555);
  11. module.exports = io;