diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index e27be4d..590f50f 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -6,10 +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 }); +//import { createAdapter } from 'socket.io-redis'; +const createAdapter = require('socket.io-redis'); +//import { RedisClient } from 'redis'; +const RedisClient = require("redis"); +//const pubClient = redis.createClient({ host: 'localhost', port: 6379 } ); +const pubClient = redis.createClient(); + +//const pubClient = new RedisClient({ host: 'localhost', port: 6379 }); const subClient = pubClient.duplicate(); io.adapter(createAdapter({ pubClient, subClient }));