Join our community

Get access to the complete guide to developing and deploying fast, production-ready Nuxt apps.

5-14 Update Course Meta Endpoint

In this lesson we update our course meta endpoint to grab our data using Prisma.

We use the include shortcut along with generated types for added type safety. We then update the useCourse function to use our new type, and get rid of most of our custom types (that are now redundant).

Finally, we delete the courseData from the server. All data is now being served from our database!

UPDATE, December 2023: There’s a bug in this lesson that’s fixed in lesson 6-2, but the code repo has been updated to include this fix a bit earlier on so the app continues to work as expected.

Generated types in Prisma: https://www.prisma.io/docs/concepts/components/prisma-client/advanced-type-safety/operating-against-partial-structures-of-model-types

This course was originally built with Nuxt 3, but it's no longer being maintained. You can still follow the lessons, but make sure to use the exact dependency versions listed in the course repository to avoid breaking changes.

If you’re looking for the most up-to-date and fully supported version, we recommend Mastering Nuxt: Full Stack Unleashed , which uses Nuxt 4 and actively being maintained.