IO-233 WIP CDK.

This commit is contained in:
Patrick Fic
2021-06-23 10:57:57 -07:00
parent 4f6bb02ab7
commit 5be2d7bd39
9 changed files with 177 additions and 7 deletions

View File

@@ -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;