import { createServer } from "http"; import { Server } from "socket.io"; const httpServer = createServer(); const io = new Server(httpServer, { // options }); io.on('connection', (socket) => { console.log("connection de l'utilisateur à l'id ". socket.id); }); io.on('launchGame' , function () { console.log('launch the game'); location.reload(); }); httpServer.listen(3000);