This commit is contained in:
Cassio Santos
2020-05-23 17:19:42 -03:00
commit 47f152a145
48 changed files with 19316 additions and 0 deletions

14
backend/socket.js Normal file
View File

@@ -0,0 +1,14 @@
let io;
module.exports = {
init: httpServer => {
io = require("socket.io")(httpServer);
return io;
},
getIO: () => {
if (!io) {
throw new Error("Socket IO not initialized");
}
return io;
},
};