In addition to implementing the standard route handling, you also need to implement route handling to interact with the database. You break these route handlers out of the standard cart_route.js
file and into their own files for each model, to keep the code clean and ensure a good division of responsibilities.
The following sections cover the implementation of the model-specific controllers for the Customer
, Order
, and Product
models.