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