The video for this lesson is currently being updated, please read the transcript instead.

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.

Controller

To view the complete lesson you'll need to login or join this course.


Click to load comments...