socket io cors version 2 express code example
Example: socket io with cors
const io = require("socket.io")(httpServer,
{
cors: {
origin: "*",
methods: ["GET", "POST"]
}});
const io = require("socket.io")(httpServer,
{
cors: {
origin: "*",
methods: ["GET", "POST"]
}});