According to the Nuxt.js codes of 1.0.0-alpha1, initialization of nuxt has been changed into asynchronous. So how can we use koa in server side codes, should I wrap all koa app.use inside nuxt.then ?
const nuxt = new Nuxt(config)
nuxt.then((nuxt) => {
nuxt.build()
app.use(async (ctx, next) => {
// ...
await next()
// ...
})
app.use(async (ctx, next) => {
// ...
await next()
// ...
})
})
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c640">#c640</a>)</em></sub></div>