diff --git a/server/services/redis.js b/server/services/redis.js new file mode 100644 index 0000000..e69de29 diff --git a/server/services/socket.js b/server/services/socket.js new file mode 100644 index 0000000..dee8c71 --- /dev/null +++ b/server/services/socket.js @@ -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!`)); + }); +} \ No newline at end of file