Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using sticky-session with hapi.js #27

Open
taktran opened this issue Jul 23, 2015 · 3 comments
Open

Using sticky-session with hapi.js #27

taktran opened this issue Jul 23, 2015 · 3 comments

Comments

@taktran
Copy link

taktran commented Jul 23, 2015

Are there any tips on how to use sticky-session with hapijs + socket.io (while using glue). I have a server.js which looks like

var Composer = require('./index');

Composer(function (err, server) {

    if (err) {
        throw err;
    }

    server.start(function () {
      // Server started
    });
});

where index.js looks like

// ...
module.exports = Glue.compose.bind(Glue, Manifest.get('/'), composeOptions);

Basically, based off https://github.com/jedireza/frame

On the socket.io side, I have a webSockets.js plugin defined in the manifest file, that looks like

exports.register = function(server, options, next) {
    io = socketIO.listen(server.listener);

    // ...
    next();
}

exports.register.attributes = {
    name: 'webSockets'
};

My main question is where would I hook in sticky session - in the server file or the websocket file, or do I need to remove the use of glue altogether?

@roymap
Copy link

roymap commented Mar 10, 2016

any answers to this question?

@mashaalmemon
Copy link

Any answers to this question as yet?

@felipekm
Copy link

Maybe @hueniverse could help on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants