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.
11 lines
340 B
11 lines
340 B
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!`));
|
|
});
|
|
}
|