Repository navigation
API Server
Billy Bunn edited this page Mar 29, 2019
·
1 revision
Using router.param is similar to app.use—which uses middleware for each http method. router.param triggers middleware only when a route with the parameter name is used. It's a way of making a piece of middleware run only for certain routes.
Mongoose is a way to model data put into a mongo database. When the mongoose module is installed in a program, it can be used to add methods to a schema that allow us to interact with mongo. It saves us the trouble of writing a bunch of code/logic to read/write/edit/delete records in mongo. It uses middleware called hooks to do this.
All wiki pages are summaries of the work of others. See the top of each page for the source blogs/articles/books and their authors. All other content by Billy Bunn.