Browse Source

Add services

main
Haris Razis 4 years ago
parent
commit
7513222e2f
No known key found for this signature in database GPG Key ID: 86A4D290ED03FAB4
  1. 0
      server/services/redis.js
  2. 11
      server/services/socket.js

0
server/services/redis.js

11
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!`));
});
}
Loading…
Cancel
Save