Werk hoofdapplicatie bij

Legt de bestaande wijzigingen in de hoofdworktree vast voordat de laatste worktree wordt gemerged.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-08-07 20:45:36 +02:00
parent 26a820b41a
commit c07d503d83
41 changed files with 1837 additions and 313 deletions
+20 -1
View File
@@ -1,13 +1,30 @@
require("dotenv").config();
const http = require("http");
const { Server } = require("socket.io");
const createApp = require("./config/express");
const session = require("./config/session");
const socketHandlers = require("./sockets/handlers");
const app = createApp();
const server = http.createServer(app);
const io = new Server(server, {
cors: {
origin: "*",
methods: ["GET", "POST"]
}
});
io.use((socket, next) => session(socket.request, {}, next));
socketHandlers(io);
// Make io available in routes
app.locals.io = io;
const PORT = process.env.PORT || 3000;
server.listen(PORT, () => {
@@ -22,4 +39,6 @@ server.listen(PORT, () => {
console.log("===================================");
});
console.log("");
});