|
|
@ -6,6 +6,14 @@ var http = require('http').Server(app); |
|
|
|
var https = require('https'); |
|
|
|
var io = require('socket.io')(http); |
|
|
|
|
|
|
|
import { createAdapter } from 'socket.io-redis'; |
|
|
|
import { RedisClient } from 'redis'; |
|
|
|
|
|
|
|
const pubClient = new RedisClient({ host: 'localhost', port: 6379 }); |
|
|
|
const subClient = pubClient.duplicate(); |
|
|
|
|
|
|
|
io.adapter(createAdapter({ pubClient, subClient })); |
|
|
|
|
|
|
|
const MongoClient = require('mongodb').MongoClient; |
|
|
|
|
|
|
|
//var chokidar = require("chokidar");
|
|
|
|