import { fetch } from "nitro"; export default async function renderer({ url }: { req: Request; url: URL }) { const apiRes = await fetch("/api/hello").then((res) => res.text()); return new Response( /* html */ ` Custom Renderer

Hello from custom renderer!

Current path: ${url.pathname}

API says: ${apiRes}

`, { headers: { "content-type": "text/html; charset=utf-8" } } ); }