Haris Razis
4 years ago
2 changed files with 11 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||
const socket = require('socket.io'); |
|||
const chalk = require('chalk') |
|||
|
|||
module.exports = (server) => { |
|||
// noinspection JSValidateTypes
|
|||
const io = socket(server) |
|||
|
|||
io.on('connection', socket => { |
|||
console.log(chalk.bgWhiteBright.black.bold(`Client with id: ${chalk.bgBlack.whiteBright(socket.id)} just connected!`)); |
|||
}); |
|||
} |
Loading…
Reference in new issue