3 Matching Annotations
  1. Jun 2018
    1. 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

    1. 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

    2. 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... :)