Adding a Server-Side Database

We added Koa as the server-side framework for our Nuxt app in the previous chapter with some dummy data. In this chapter, we will set up MongoDB as the server-side database to replace that dummy data. We will write some MongoDB CRUD queries, add data to the database, and use asyncData to fetch the data from the database.

The topics we will cover in this chapter are as follows:

  • Introducing MongoDB
  • Writing basic MongoDB queries
  • Writing MongoDB CRUD operations
  • Injecting data with MongoDB CRUD queries
  • Integrating MongoDB with Koa
  • Integrating with Nuxt pages

Introducing MongoDB

MongoDB is an open source document-oriented database management system (DBMS) that stores data in JSON-like documents called Binary JSON ...

Get Hands-on Nuxt.js Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.