run npm start if you've already got the full database generated
comment out routes other than /customers
add app.use('/api/v1/', routes); after routes declaration in app.js
Go to the 3 urls listed above and see if they give the results
Testing
[ ] There are new unit tests in this PR, and I verify that there is full coverage of all new code.
[ ] I certify that all existing tests pass
// productsIndexRouter.use(require('./productOrders'));
// productsIndexRouter.use(require('./orders'));
Documentation
[x] There is new documentation in this pull request that must be reviewed..
[ ] I added documentation for any new classes/methods
Deploy Notes
Notes regarding deployment the contained body of work. These should note any
db migrations, etc.
Description
This sets up the routes and endpoints for the GET requests for Customers
Related Ticket(s)
64
Fixes #11
Expected Behavior
go to http://127.0.0.1:8080/api/v1/customers and it should list all customers go to http://127.0.0.1:8080/api/v1/customers/0 to see the first customer -- test other id numbers to see singular customers go to http://127.0.0.1:8080/api/v1/customers?active=false to see just the customers that dont have any past orders
Steps to Test Solution
npm start
if you've already got the full database generated/customers
app.use('/api/v1/', routes);
afterroutes
declaration inapp.js
Testing
[ ] There are new unit tests in this PR, and I verify that there is full coverage of all new code. [ ] I certify that all existing tests pass // productsIndexRouter.use(require('./productOrders')); // productsIndexRouter.use(require('./orders'));
Documentation
[x] There is new documentation in this pull request that must be reviewed.. [ ] I added documentation for any new classes/methods
Deploy Notes
Notes regarding deployment the contained body of work. These should note any db migrations, etc.