1. String: URL to render
      2. Optional, Object: options
      • virtualConsole: Boolean (default: true)
    • Returns: Promise

    This method is made for test purposes.

    Example:

    1. const { loadNuxt } = require('nuxt')
    2. async function init() {
    3. // Assuming you've already built your project
    4. const nuxt = await loadNuxt({ for: 'start' })
    5. const window = await nuxt.renderAndGetWindow('http://localhost:3000')
    6. // Display the head `<title>`
    7. console.log(window.document.title)
    8. nuxt.close()
    9. }