Open taktran opened 9 years ago
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
sticky-session
server.js
var Composer = require('./index'); Composer(function (err, server) { if (err) { throw err; } server.start(function () { // Server started }); });
where index.js looks like
index.js
// ... 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
webSockets.js
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?
glue
any answers to this question?
Any answers to this question as yet?
Maybe @hueniverse could help on this?
Are there any tips on how to use
sticky-session
with hapijs + socket.io (while using glue). I have aserver.js
which looks likewhere
index.js
looks likeBasically, 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 likeMy 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?