ajout de nodemon
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7c09c0d811
commit
623acbdbee
@ -1,11 +1,22 @@
|
||||
//const io = require('socket.io')('http://localhost:3000');
|
||||
const http = require('http');
|
||||
const io = require('socket.io')('http://82.165.180.114:3000');
|
||||
|
||||
io.on('connection', socket => {
|
||||
const server = http.createServer((req,res) => {
|
||||
res.end('Création du serveur');
|
||||
});
|
||||
|
||||
const socketServer = io(server);
|
||||
|
||||
socketServer.on('connection', socket => {
|
||||
console.log("connection de l'utilisateur à l'id ". socket.id);
|
||||
})
|
||||
|
||||
io.on('launchGame') , function () {
|
||||
socketServer.on('launchGame') , function () {
|
||||
console.log('launch the game');
|
||||
location.reload();
|
||||
}
|
||||
|
||||
server.listen(3000, () => {
|
||||
console.log('app listening on port 3000')
|
||||
});
|
Loading…
Reference in new issue