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