IO-233 WIP CDK.
This commit is contained in:
12
server.js
12
server.js
@@ -151,7 +151,17 @@ app.get("/", async function (req, res) {
|
||||
const http = require("http");
|
||||
const server = http.createServer(app);
|
||||
const { Server } = require("socket.io");
|
||||
const io = new Server(server, { path: "/ws" });
|
||||
const io = new Server(server, {
|
||||
path: "/ws",
|
||||
cors: {
|
||||
origin: [
|
||||
"https://test.imex.online",
|
||||
"http://localhost:3000",
|
||||
"https://imex.online",
|
||||
],
|
||||
methods: ["GET", "POST"],
|
||||
},
|
||||
});
|
||||
|
||||
server.listen(port, (error) => {
|
||||
if (error) throw error;
|
||||
|
||||
Reference in New Issue
Block a user