Skip to content

API Server

Billy Bunn edited this page Mar 29, 2019 · 1 revision

router.param(name, callback)

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

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.

Resources

Read

Skim and Bookmark]()

Clone this wiki locally