add view socket
This commit is contained in:
parent
0d40e4d052
commit
36bef713e8
@ -21,9 +21,13 @@ const app = express();
|
||||
const server = createServer(app);
|
||||
|
||||
// Socket.IO setup with CORS
|
||||
const ORIGIN_URL =
|
||||
process.env.NODE_ENV === "production"
|
||||
? "https://med.tomastm.com"
|
||||
: "http://localhost:5173";
|
||||
const io = new Server(server, {
|
||||
cors: {
|
||||
origin: "http://localhost:5173", // React app URL
|
||||
origin: ORIGIN_URL,
|
||||
methods: ["GET", "POST"],
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user