Added comments and readme
This commit is contained in:
parent
1d632252bf
commit
e25c8606d9
8 changed files with 252 additions and 16 deletions
|
|
@ -1,7 +1,12 @@
|
|||
// Erstellt den zentralen Socket.IO-Server auf Port 3001.
|
||||
// Wird von timer.js, score.js und den Routen importiert,
|
||||
// um Events (Timer, Score, Refresh) an alle verbundenen Clients zu senden.
|
||||
|
||||
const { Server } = require('socket.io');
|
||||
|
||||
// CORS auf "*" gesetzt, da Admin und Monitor auf unterschiedlichen Ports laufen können
|
||||
const io = new Server(3001, {
|
||||
cors: { origin: "*" }
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = io
|
||||
Loading…
Add table
Add a link
Reference in a new issue