Nuxt/packages/nuxt/test/nitro/render-index.ts
2025-03-05 10:11:57 +00:00

15 lines
382 B
TypeScript

// @ts-expect-error untyped
import '#nitro-internal-pollyfills'
import type { NitroApp } from '#internal/nitro/app'
import { useNitroApp } from '#internal/nitro/app'
const nitroApp = useNitroApp()
async function renderIndex () {
const text = await (nitroApp as NitroApp).localFetch('/', {}).then(r => r.text())
// eslint-disable-next-line
console.log(text)
}
renderIndex()