mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-17 19:37:02 +00:00
chore: removed unused dependency
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
"sequelize-cli": "^5.5.1",
|
||||
"sequelize-typescript": "^1.1.0",
|
||||
"socket.io": "^2.3.0",
|
||||
"socket.io-redis": "^5.4.0",
|
||||
"whatsapp-web.js": "1.11.1",
|
||||
"yup": "^0.29.3"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import socketIo, { Server as SocketIO } from "socket.io";
|
||||
import socketRedis from "socket.io-redis";
|
||||
import { Server } from "http";
|
||||
import AppError from "../errors/AppError";
|
||||
|
||||
@@ -7,15 +6,7 @@ let io: SocketIO;
|
||||
|
||||
export const initIO = (httpServer: Server): SocketIO => {
|
||||
io = socketIo(httpServer);
|
||||
|
||||
if (process.env.NODE_ENV === "PRODUCTION") {
|
||||
io.adapter(
|
||||
socketRedis({
|
||||
host: process.env.IO_REDIS_SERVER,
|
||||
port: Number(process.env.IO_REDIS_PORT)
|
||||
})
|
||||
);
|
||||
}
|
||||
io.origins([process.env.FRONTEND_URL || "*"]);
|
||||
|
||||
io.on("connection", socket => {
|
||||
console.log("Client Connected");
|
||||
|
||||
Reference in New Issue
Block a user