Files
Livebeat/backend/lib/socketio.ts
Mondei1 9f1aa50681 Add barebone to support socket.io
(This is more a temp commit to update the frontend)
2021-05-06 15:24:20 +02:00

24 lines
485 B
TypeScript

import * as socketio from "socket.io";
/**
* This class handles all SocketIO connections.
*
* *SocketIO is another layer ontop of WebSockets*
*/
class SocketManager {
io: socketio.Server;
express: Express.Application;
constructor (express: Express.Application) {
this.io = new socketio.Server(express);
this.express = express;
}
init() {
this.io.on('connect', data => {
console.log('New connection')
});
}
}