not really known
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.
 
 
 

19 lines
490 B

var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
const port = 3000;
//Whenever someone connects this gets executed
io.on('connection', function(socket) {
console.log('A user connected');
//Whenever someone disconnects this piece of code executed
socket.on('disconnect', function () {
console.log('A user disconnected');
});
});
http.listen(port, function() {
console.log('listening on *:3000');
});