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'
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?
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.registercallback:But didn't work. Any suggestion?