Static GitHub Issues

[3068] Examples: ensure the readiness of Nuxt

prev: Module hooks documentation
next: Decouple Renderer from the Nuxt class

The examples mounts the middleware without waiting for readiness:

https://github.com/nuxt/nuxt.js/blob/d1d637f0c4a55fb68895740ceb97b0e92e07fafd/examples/custom-server/server.js#L13-L22

This applies to our own commands as well.

https://github.com/nuxt/nuxt.js/blob/d1d637f0c4a55fb68895740ceb97b0e92e07fafd/bin/nuxt-start#L54-L83

Although in practice this have never caused an issue, we should document the fact that Nuxt itself is initialized asynchronously, and ensure the readiness before actually starting the server.

<!--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/c2655">#c2655</a>)</em></sub></div>