3 Matching Annotations
- Jun 2018
-
developer.mozilla.org developer.mozilla.org
-
We've decided not to have a model for the BookInstance:status — we will hard code the acceptable values because we don't expect these to change
the consideration here not to have this as a model is the unlikelihood that the values will change over time
-
-
developer.mozilla.org developer.mozilla.org
-
First it loads the express module, and uses it to get an express.Router object. Then it specifies a route on that object, and lastly exports the router from the module (this is what allows the file to be imported into app.js).
This is how a route file is recommended to be written by them. Possibly other ways exists
-
The last middleware in the file adds handler methods for errors and HTTP 404 responses.
since its the last, it means no prior middleware caught and 'handled' this requests, therefore its considered for an unknown url/resource - meaning 404... :)
-