chore: removed unused dependency

This commit is contained in:
canove
2021-01-06 19:44:03 -03:00
parent 3717b3c159
commit 054fff4182
2 changed files with 1 additions and 11 deletions

View File

@@ -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"
},

View File

@@ -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");