mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 03:39:29 +00:00
15 lines
211 B
JavaScript
15 lines
211 B
JavaScript
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;
|
|
},
|
|
};
|