Programming WebRTC: How to configure CORS for the signaling server

@karlstolley

I want to run the signaling server and the front-end (e.g., basic_p2p app) on separate ports.

From the client side, I get this “CORS missing allow origin” when connecting to the server.
How to solve that issue?

What I tried so far (and that didn’t work):

// server.js
const cors = require("cors");
const app = express();
app.use(cors());