Skip to content

Instantly share code, notes, and snippets.

@ebourmalo
Last active August 30, 2015 16:08
Show Gist options
  • Save ebourmalo/1f93949c6bd0d3529f3d to your computer and use it in GitHub Desktop.
Save ebourmalo/1f93949c6bd0d3529f3d to your computer and use it in GitHub Desktop.
var app = feathers()
.configure(feathers.rest())
.configure(feathers.primus({
transformer: 'engine.io'
}, function(primus) {
primus.on('connection', function() {
logger.info('Server primus ready');
});
}))
.configure(require('feathers-hooks'))
.use(function(request, response, next) {
// inject the current user into feathers params
request.feathers.user = request.session.user;
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment