Skip to content

Instantly share code, notes, and snippets.

@mices
mices / server.js
Created June 26, 2021 22:11
Snippet from top of server.js
require('dotenv').config();
const express = require("express");
const http = require("http");
const app = express();
const cors = require('cors');
const server = http.createServer(app);
const socket = require("socket.io");
const io = socket(server);
io.use(cors());
const users = {};