Skip to content

Commit

Permalink
fix: server: CORS allow all, PORT env
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Dec 17, 2020
1 parent e59f56c commit 178fd89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ const bodyParser = require('body-parser')
const http = require('http').createServer(app);
const io = require('socket.io')(http, {
cors: {
origin: "http://localhost:3000",
origin: "*",
methods: ["GET", "POST"],
credentials: true
}
});

const port = 3001;
const port = process.env.PORT || 3001;

let userSocket;

Expand Down

0 comments on commit 178fd89

Please sign in to comment.