Skip to content

Instantly share code, notes, and snippets.

@daffl
Last active January 9, 2017 16:27
Show Gist options
  • Select an option

  • Save daffl/c03e5594d1c24b4e8370c2791e8cae75 to your computer and use it in GitHub Desktop.

Select an option

Save daffl/c03e5594d1c24b4e8370c2791e8cae75 to your computer and use it in GitHub Desktop.
Feathers default hooks
const feathers = require('feathers');
const hooks = require('feathers-hooks');
const app = feathers().configure(hooks());
// Add a service mixin
app.mixins.push(function(service) {
service.before(function() {
console.log('Before all default hook is running');
});
});
app.use('/todos', todoService);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment