Skip to content

Cant get it working with 'socket.io-redis' #30

@arashkay

Description

@arashkay

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions