learn hapi — Customize API Endpoints with Query Parameters

Relations in Mongoose provide JOIN-like functionality and extend documents with related ones from other collections. In case of Futureflix, you know that a TV show has one or many seasons and each season has many episodes.

You can imagine the large JSON result for a long-running TV show with a dozen seasons and 20 episodes per season. When requesting TV show data via API, you don’t always want to deliver the complete data set for TV shows.

Let users customize the result of API endpoints with query parameters. Specifically, implement the functionality to extend the JSON result for TV shows gradually with seasons or seasons and episodes.

hapi Series Overview


Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.