You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Scripted/WEB/server.js

16 lines
391 B

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);