node-go/packages/play-node-go/server/socket.js

14 lines
336 B
JavaScript
Raw Normal View History

// TODO const someSocketLogic = require('./middleware/socketssockets/...');
2020-01-08 07:17:10 +00:00
module.exports = {
enableSocket: io => {
2020-01-16 04:04:55 +00:00
// io.on('connection', () => console.log('connected'))
io.on('connection', ()=> {
io.emit('connected', {message: 'socket connected'});
2020-01-08 07:17:10 +00:00
})
// TODO io = someSocketLogic(io);
2020-01-08 07:17:10 +00:00
return io;
}
}