ccess to XMLHttpRequest at 'http://localhost:8000/socket.io/?EIO=4&transport=polling&t=NSlavVc' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. code example
Example: socket io with cors
const io = require("socket.io")(httpServer,
{
cors: {
origin: "*",
methods: ["GET", "POST"]
}});