add sockets and change subscription

This commit is contained in:
DenAntonov
2025-06-12 21:04:12 +03:00
parent bffa3fa2a3
commit 24ff712306
6 changed files with 199 additions and 83 deletions

View File

@@ -5,7 +5,14 @@ let io = null
export const setIo = (app) => {
const server = createServer(app)
io = new Server(server, {})
io = new Server(server, {
cors: {
origin: "*",
methods: ["GET", "POST"],
credentials: false
},
transports: ['websocket', 'polling']
})
return server
}