You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using PM2 with -i max to run my app as cluster but the initial handshake fails. There is a solution which is http://socket.io/docs/using-multiple-nodes/ by using 'socket.io-redis'
var io = require('socket.io')(3000);
var redis = require('socket.io-redis');
io.adapter(redis({ host: 'localhost', port: 6379 }));
Just tried to do something like this on server.register callback:
var io = server.plugins['hapi-io'].io;
var redis = require('socket.io-redis');
io.adapter(redis({ host: 'localhost', port: 6379 }));
But didn't work. Any suggestion?
The text was updated successfully, but these errors were encountered:
Hi @sibartlett ,
I'm using PM2 with -i max to run my app as cluster but the initial handshake fails. There is a solution which is http://socket.io/docs/using-multiple-nodes/ by using 'socket.io-redis'
Just tried to do something like this on
server.register
callback:But didn't work. Any suggestion?
The text was updated successfully, but these errors were encountered: