import { useRuntimeConfig } from 'nitro/runtime-config' import { render } from './renderer.ts' export default { async fetch (request: Request): Promise { const url = new URL(request.url) const config = useRuntimeConfig() return new Response( [ ``, `

${url.pathname}

`, `
runtimeConfig=${JSON.stringify(config, null, 2)}
`, `
renderer=${await render()}
`, ].join(''), { headers: { 'content-type': 'text/html; charset=utf-8' } }, ) }, }