GET /items route and database seed
We're now going to create and test our second route, GET /items. This endpoint is will return all of the existing items in the database, and is used to power the front page of the app which displays all the items.
We've actually already created this route and controller method for this endpoint when we were prototyping the API.
Now we're going to make it work properly by connecting it to the database.
Click to load comments...