Added base project

This commit is contained in:
2025-12-04 20:45:22 +00:00
parent dc16a150e1
commit 2f47f69adb
148 changed files with 3289 additions and 4212 deletions
+19
View File
@@ -0,0 +1,19 @@
import { Server } from "socket.io";
import { handleConnectionEvents } from "./events/connection.js";
export const server = {
io: null,
};
export const serverStart = (port) => {
server.io = new Server(port, {
cors: {
origin: "*",
},
});
server.io.on("connection", (socket) => {
console.log("New connection:", socket.id);
handleConnectionEvents(server.io, socket);
});
};