const express = require('express'); const app = express(); const http = require('http'); const server = http.createServer(app); const sio = require("socket.io")(server, { cors: { origin: "http://localhost:2000", methods: ["GET", "POST"] } }); let list = {}; sio.on("connection", (socket) => { console.log(socket.id); list[socket.id] = socket console.log("Connected!"); // socket.emit('abc', 453345)..