- Utilize Router
- Use the pg library
- Connect to a Postgres DB using the pg node module
- refactor the
orders
controller- by extracting any database-related functionality into the corresponding
Order
model
- by extracting any database-related functionality into the corresponding
- You can then refactor the existing tests to use your
Order
model.
orders
controller doesn't include any SQL queriesOrder
model has all existing methods implementedapp.test.js
uses theOrder
model instead of SQL
Task | Points |
---|---|
orders controller refactored |
4 |
Order model implementation complete |
4 |
Tests refactored to use Order model |
2 |