node-go/server/socket.js

14 lines
330 B
JavaScript
Raw Permalink Normal View History

// TODO const someSocketLogic = require('./middleware/socketssockets/...');
2020-01-08 07:17:10 +00:00
module.exports = {
enableSocket: io => {
2020-01-08 07:17:10 +00:00
io.on('connection', () => console.log('connected'))
io.on('connect', ()=> {
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;
}
}