Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
'use strict';
module.exports = function(app) {
var categories = require('../../app/controllers/categories.server.controller');
// Finish by binding the article middleware
// What's this? Where the categoryId is present in the URL
// the logic to 'get by id' is handled by this single function
// and added to the request object i.e. request.category.
app.param('categoryId', categories.categoryByID);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment