In this chapter, you will learn how to configure Nuxt with a server-side framework, and how to use the asyncData method to fetch the data from the server-side framework, such as Koa or Express. Setting up a server-side framework with Nuxt is fairly easy. We only need to pick a framework as the first-class citizen and use Nuxt as the middleware. We can use npx create-nuxt-app <project-name> to set that up for us, but we will walk you through how to do that manually so that you have a better understanding of how these two apps work together. Additionally, in this chapter, we will use Backpack as the build system for our app.
The topics we will cover in this chapter are as follows:
- Introducing Backpack
- Introducing Koa
- Integrating Koa with Nuxt
- Understanding async data
- Accessing context in asyncData
- Fetching async data with Axios