I have an issue with it const io = require("socket.io").listen(server)
so I changed to const io = require("socket.io")(4000).listen(server);
and it didn't work too,
Please Help me to fix this issue .
Hi, I searched about this bug since I had the same problem and I found out that 'require("socket.io")' returns a socket.io Server class. So you can just do const io = require("socket.io")(Port || ExistingHttpServer); and it should work
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have an issue with it const io = require("socket.io").listen(server)
so I changed to const io = require("socket.io")(4000).listen(server);
and it didn't work too,
Please Help me to fix this issue .
Hi, I searched about this bug since I had the same problem and I found out that 'require("socket.io")' returns a socket.io Server class. So you can just do const io = require("socket.io")(Port || ExistingHttpServer); and it should work