[{"data":1,"prerenderedAt":1346},["ShallowReactive",2],{"navigation":3,"examples-nav":394,"-examples-renderer":495,"-examples-renderer-surround":1343},[4,88,217,223,379,391],{"title":5,"path":6,"stem":7,"children":8,"icon":87},"","/docs","1.docs/1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-compass",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","/docs/quick-start","1.docs/2.quick-start","i-lucide-zap",{"title":18,"path":19,"stem":20,"icon":21},"Renderer","/docs/renderer","1.docs/4.renderer","ri:layout-masonry-line",{"title":23,"path":24,"stem":25,"icon":26},"Routing","/docs/routing","1.docs/5.routing","ri:direction-line",{"title":28,"path":29,"stem":30,"icon":31},"Assets","/docs/assets","1.docs/50.assets","ri:image-2-line",{"title":33,"path":34,"stem":35,"icon":36},"Configuration","/docs/configuration","1.docs/50.configuration","ri:settings-3-line",{"title":38,"path":39,"stem":40,"icon":41},"Database","/docs/database","1.docs/50.database","ri:database-2-line",{"title":43,"path":44,"stem":45,"icon":46},"Lifecycle","/docs/lifecycle","1.docs/50.lifecycle","i-lucide-layers",{"title":48,"path":49,"stem":50,"icon":51},"OpenAPI","/docs/openapi","1.docs/50.openapi","ri:contract-line",{"title":53,"path":54,"stem":55,"icon":56},"Plugins","/docs/plugins","1.docs/50.plugins","ri:plug-line",{"title":58,"path":59,"stem":60,"icon":61},"Tasks","/docs/tasks","1.docs/50.tasks","codicon:run-all",{"title":63,"path":64,"stem":65,"icon":66},"Server Entry","/docs/server-entry","1.docs/6.server-entry","ri:server-line",{"title":68,"path":69,"stem":70,"icon":71},"Cache","/docs/cache","1.docs/7.cache","ri:speed-line",{"title":73,"path":74,"stem":75,"icon":76},"KV Storage","/docs/storage","1.docs/8.storage","carbon:datastore",{"title":78,"path":79,"stem":80,"icon":81},"Migration Guide","/docs/migration","1.docs/99.migration","ri:arrow-right-up-line",{"title":83,"path":84,"stem":85,"icon":86},"Nightly Channel","/docs/nightly","1.docs/99.nightly","ri:moon-fill","i-lucide-book-open",{"title":89,"path":90,"stem":91,"children":92,"icon":94},"Deploy","/deploy","2.deploy/0.index",[93,95,116],{"title":89,"path":90,"stem":91,"icon":94},"ri:upload-cloud-2-line",{"title":96,"path":97,"stem":98,"children":99,"page":115},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[100,105,110],{"title":101,"path":102,"stem":103,"icon":104},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":106,"path":107,"stem":108,"icon":109},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":111,"path":112,"stem":113,"icon":114},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":117,"path":118,"stem":119,"children":120,"page":115},"Providers","/deploy/providers","2.deploy/20.providers",[121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,193,197,201,205,209,213],{"title":122,"path":123,"stem":124},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":126,"path":127,"stem":128},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":130,"path":131,"stem":132},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":134,"path":135,"stem":136},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":138,"path":139,"stem":140},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":142,"path":143,"stem":144},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":146,"path":147,"stem":148},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":150,"path":151,"stem":152},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":154,"path":155,"stem":156},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":158,"path":159,"stem":160},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":162,"path":163,"stem":164},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":166,"path":167,"stem":168},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":170,"path":171,"stem":172},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":174,"path":175,"stem":176},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":178,"path":179,"stem":180},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":182,"path":183,"stem":184},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":186,"path":187,"stem":188},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":190,"path":191,"stem":192},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":194,"path":195,"stem":196},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":198,"path":199,"stem":200},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":202,"path":203,"stem":204},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":206,"path":207,"stem":208},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":210,"path":211,"stem":212},"Zephyr Cloud","/deploy/providers/zephyr","2.deploy/20.providers/zephyr",{"title":214,"path":215,"stem":216},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":218,"path":219,"stem":220,"children":221,"icon":36},"Config","/config","3.config/0.index",[222],{"title":218,"path":219,"stem":220,"icon":36},{"title":224,"path":225,"stem":226,"children":227,"icon":229},"Examples","/examples","4.examples/0.index",[228,230,235,240,245,250,254,259,264,269,274,279,284,288,293,297,301,306,311,316,321,326,331,336,341,346,350,355,360,364,369,374],{"title":224,"path":225,"stem":226,"icon":229},"i-lucide-folder-code",{"title":231,"path":232,"stem":233,"icon":234},"API Routes","/examples/api-routes","4.examples/api-routes","i-lucide-route",{"title":236,"path":237,"stem":238,"icon":239},"Auto Imports","/examples/auto-imports","4.examples/auto-imports","i-lucide-import",{"title":241,"path":242,"stem":243,"icon":244},"Cached Handler","/examples/cached-handler","4.examples/cached-handler","i-lucide-clock",{"title":246,"path":247,"stem":248,"icon":249},"Custom Error Handler","/examples/custom-error-handler","4.examples/custom-error-handler","i-lucide-alert-circle",{"title":38,"path":251,"stem":252,"icon":253},"/examples/database","4.examples/database","i-lucide-database",{"title":255,"path":256,"stem":257,"icon":258},"Elysia","/examples/elysia","4.examples/elysia","i-skill-icons-elysia-dark",{"title":260,"path":261,"stem":262,"icon":263},"Express","/examples/express","4.examples/express","i-simple-icons-express",{"title":265,"path":266,"stem":267,"icon":268},"Fastify","/examples/fastify","4.examples/fastify","i-simple-icons-fastify",{"title":270,"path":271,"stem":272,"icon":273},"Hello World","/examples/hello-world","4.examples/hello-world","i-lucide-sparkles",{"title":275,"path":276,"stem":277,"icon":278},"Hono","/examples/hono","4.examples/hono","i-logos-hono",{"title":280,"path":281,"stem":282,"icon":283},"Import Alias","/examples/import-alias","4.examples/import-alias","i-lucide-at-sign",{"title":285,"path":286,"stem":287,"icon":46},"Middleware","/examples/middleware","4.examples/middleware",{"title":289,"path":290,"stem":291,"icon":292},"Mono JSX","/examples/mono-jsx","4.examples/mono-jsx","i-lucide-brackets",{"title":294,"path":295,"stem":296,"icon":292},"Nano JSX","/examples/nano-jsx","4.examples/nano-jsx",{"title":53,"path":298,"stem":299,"icon":300},"/examples/plugins","4.examples/plugins","i-lucide-plug",{"title":302,"path":303,"stem":304,"icon":305},"Custom Renderer","/examples/renderer","4.examples/renderer","i-lucide-code",{"title":307,"path":308,"stem":309,"icon":310},"Runtime Config","/examples/runtime-config","4.examples/runtime-config","i-lucide-settings",{"title":312,"path":313,"stem":314,"icon":315},"Server Fetch","/examples/server-fetch","4.examples/server-fetch","i-lucide-arrow-right-left",{"title":317,"path":318,"stem":319,"icon":320},"Shiki","/examples/shiki","4.examples/shiki","i-lucide-highlighter",{"title":322,"path":323,"stem":324,"icon":325},"Virtual Routes","/examples/virtual-routes","4.examples/virtual-routes","i-lucide-box",{"title":327,"path":328,"stem":329,"icon":330},"Vite Nitro Plugin","/examples/vite-nitro-plugin","4.examples/vite-nitro-plugin","i-logos-vitejs",{"title":332,"path":333,"stem":334,"icon":335},"Vite RSC","/examples/vite-rsc","4.examples/vite-rsc","i-logos-react",{"title":337,"path":338,"stem":339,"icon":340},"Vite SSR HTML","/examples/vite-ssr-html","4.examples/vite-ssr-html","i-logos-html-5",{"title":342,"path":343,"stem":344,"icon":345},"SSR with Preact","/examples/vite-ssr-preact","4.examples/vite-ssr-preact","i-logos-preact",{"title":347,"path":348,"stem":349,"icon":335},"SSR with React","/examples/vite-ssr-react","4.examples/vite-ssr-react",{"title":351,"path":352,"stem":353,"icon":354},"SSR with SolidJS","/examples/vite-ssr-solid","4.examples/vite-ssr-solid","i-logos-solidjs-icon",{"title":356,"path":357,"stem":358,"icon":359},"SSR with TanStack Router","/examples/vite-ssr-tsr-react","4.examples/vite-ssr-tsr-react","i-simple-icons-tanstack",{"title":361,"path":362,"stem":363,"icon":359},"SSR with TanStack Start","/examples/vite-ssr-tss-react","4.examples/vite-ssr-tss-react",{"title":365,"path":366,"stem":367,"icon":368},"SSR with Vue Router","/examples/vite-ssr-vue-router","4.examples/vite-ssr-vue-router","i-logos-vue",{"title":370,"path":371,"stem":372,"icon":373},"Vite + tRPC","/examples/vite-trpc","4.examples/vite-trpc","i-simple-icons-trpc",{"title":375,"path":376,"stem":377,"icon":378},"WebSocket","/examples/websocket","4.examples/websocket","i-lucide-radio",{"title":380,"path":381,"stem":382,"children":383},"Blog","/blog","9.blog",[384,387],{"title":380,"path":381,"stem":385,"icon":386},"9.blog/index","i-lucide-file-text",{"title":388,"path":389,"stem":390,"icon":386},"Nitro v3 Beta is here!","/blog/v3-beta","9.blog/1.v3-beta",{"title":5,"path":392,"stem":393},"/","index",[395,400,404,407,410,413,417,420,423,426,429,432,435,439,442,445,448,451,454,458,461,465,468,471,474,477,480,483,486,489,492],{"title":231,"description":396,"meta":397,"path":232},"File-based API routing with HTTP method support and dynamic parameters.",{"automd":398,"category":399,"icon":234},true,"features",{"title":236,"description":401,"meta":402,"path":237},"Automatic imports for utilities and composables.",{"automd":398,"category":403,"icon":239},"config",{"title":241,"description":405,"meta":406,"path":242},"Cache route responses with configurable bypass logic.",{"automd":398,"category":399,"icon":244},{"title":246,"description":408,"meta":409,"path":247},"Customize error responses with a global error handler.",{"automd":398,"category":399,"icon":249},{"title":38,"description":411,"meta":412,"path":251},"Built-in database support with SQL template literals.",{"automd":398,"category":399,"icon":253},{"title":255,"description":414,"meta":415,"path":256},"Integrate Elysia with Nitro using the server entry.",{"automd":398,"category":416,"icon":258},"backend frameworks",{"title":260,"description":418,"meta":419,"path":261},"Integrate Express with Nitro using the server entry.",{"automd":398,"category":416,"icon":263},{"title":265,"description":421,"meta":422,"path":266},"Integrate Fastify with Nitro using the server entry.",{"automd":398,"category":416,"icon":268},{"title":270,"description":424,"meta":425,"path":271},"Minimal Nitro server using the web standard fetch handler.",{"automd":398,"category":399,"icon":273},{"title":275,"description":427,"meta":428,"path":276},"Integrate Hono with Nitro using the server entry.",{"automd":398,"category":416,"icon":278},{"title":280,"description":430,"meta":431,"path":281},"Custom import aliases for cleaner module paths.",{"automd":398,"category":403,"icon":283},{"title":285,"description":433,"meta":434,"path":286},"Request middleware for authentication, logging, and request modification.",{"automd":398,"category":399,"icon":46},{"title":289,"description":436,"meta":437,"path":290},"Server-side JSX rendering in Nitro with mono-jsx.",{"automd":398,"category":438,"icon":292},"server side rendering",{"title":294,"description":440,"meta":441,"path":295},"Server-side JSX rendering in Nitro with nano-jsx.",{"automd":398,"category":438,"icon":292},{"title":53,"description":443,"meta":444,"path":298},"Extend Nitro with custom plugins for hooks and lifecycle events.",{"automd":398,"category":399,"icon":300},{"title":302,"description":446,"meta":447,"path":303},"Build a custom HTML renderer in Nitro with server-side data fetching.",{"automd":398,"category":438,"icon":305},{"title":307,"description":449,"meta":450,"path":308},"Environment-aware configuration with runtime access.",{"automd":398,"category":403,"icon":310},{"title":312,"description":452,"meta":453,"path":313},"Internal server-to-server requests without network overhead.",{"automd":398,"category":399,"icon":315},{"title":317,"description":455,"meta":456,"path":318},"Server-side syntax highlighting in Nitro with Shiki.",{"automd":398,"category":457,"icon":320},"integrations",{"title":322,"description":459,"meta":460,"path":323},"Define routes programmatically using Nitro's virtual module system.",{"automd":398,"category":399,"icon":325},{"title":327,"description":462,"meta":463,"path":328},"Use Nitro as a Vite plugin for programmatic configuration.",{"automd":398,"category":464,"icon":330},"vite",{"title":332,"description":466,"meta":467,"path":333},"React Server Components with Vite and Nitro.",{"automd":398,"category":464,"icon":335},{"title":337,"description":469,"meta":470,"path":338},"Server-side rendering with vanilla HTML, Vite, and Nitro.",{"automd":398,"category":438,"icon":340},{"title":342,"description":472,"meta":473,"path":343},"Server-side rendering with Preact in Nitro using Vite.",{"automd":398,"category":438,"icon":345},{"title":347,"description":475,"meta":476,"path":348},"Server-side rendering with React in Nitro using Vite.",{"automd":398,"category":438,"icon":335},{"title":351,"description":478,"meta":479,"path":352},"Server-side rendering with SolidJS in Nitro using Vite.",{"automd":398,"category":438,"icon":354},{"title":356,"description":481,"meta":482,"path":357},"Client-side routing with TanStack Router in Nitro using Vite.",{"automd":398,"category":438,"icon":359},{"title":361,"description":484,"meta":485,"path":362},"Full-stack React with TanStack Start in Nitro using Vite.",{"automd":398,"category":438,"icon":359},{"title":365,"description":487,"meta":488,"path":366},"Server-side rendering with Vue Router in Nitro using Vite.",{"automd":398,"category":438,"icon":368},{"title":370,"description":490,"meta":491,"path":371},"End-to-end typesafe APIs with tRPC in Nitro using Vite.",{"automd":398,"category":464,"icon":373},{"title":375,"description":493,"meta":494,"path":376},"Real-time bidirectional communication with WebSocket support.",{"automd":398,"category":399,"icon":378},{"id":496,"title":302,"body":497,"description":446,"extension":1338,"meta":1339,"navigation":1340,"path":303,"seo":1341,"stem":304,"__hash__":1342},"content/4.examples/renderer.md",{"type":498,"value":499,"toc":1333,"icon":305},"minimark",[500,1053,1061,1065,1247,1256,1265,1269,1305,1316,1320,1329],[501,502,505,590,683,932,956,1010],"code-tree",{":expand-all":503,"default-value":504},"true","renderer.ts",[506,507,512],"pre",{"className":508,"code":509,"filename":510,"language":511,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  serverDir: \"./\",\n  renderer: { handler: \"./renderer\" },\n});\n","nitro.config.ts","ts",[513,514,515,538,544,560,572,584],"code",{"__ignoreMap":5},[516,517,520,524,528,531,535],"span",{"class":518,"line":519},"line",1,[516,521,523],{"class":522},"so5gQ","import",[516,525,527],{"class":526},"slsVL"," { defineConfig } ",[516,529,530],{"class":522},"from",[516,532,534],{"class":533},"sfrk1"," \"nitro\"",[516,536,537],{"class":526},";\n",[516,539,541],{"class":518,"line":540},2,[516,542,543],{"emptyLinePlaceholder":398},"\n",[516,545,547,550,553,557],{"class":518,"line":546},3,[516,548,549],{"class":522},"export",[516,551,552],{"class":522}," default",[516,554,556],{"class":555},"shcOC"," defineConfig",[516,558,559],{"class":526},"({\n",[516,561,563,566,569],{"class":518,"line":562},4,[516,564,565],{"class":526},"  serverDir: ",[516,567,568],{"class":533},"\"./\"",[516,570,571],{"class":526},",\n",[516,573,575,578,581],{"class":518,"line":574},5,[516,576,577],{"class":526},"  renderer: { handler: ",[516,579,580],{"class":533},"\"./renderer\"",[516,582,583],{"class":526}," },\n",[516,585,587],{"class":518,"line":586},6,[516,588,589],{"class":526},"});\n",[506,591,596],{"className":592,"code":593,"filename":594,"language":595,"meta":5,"style":5},"language-json shiki shiki-themes github-light github-dark github-dark","{\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"nitro dev\",\n    \"build\": \"nitro build\"\n  },\n  \"devDependencies\": {\n    \"nitro\": \"latest\"\n  }\n}\n","package.json","json",[513,597,598,603,617,625,637,647,652,660,671,677],{"__ignoreMap":5},[516,599,600],{"class":518,"line":519},[516,601,602],{"class":526},"{\n",[516,604,605,609,612,615],{"class":518,"line":540},[516,606,608],{"class":607},"suiK_","  \"type\"",[516,610,611],{"class":526},": ",[516,613,614],{"class":533},"\"module\"",[516,616,571],{"class":526},[516,618,619,622],{"class":518,"line":546},[516,620,621],{"class":607},"  \"scripts\"",[516,623,624],{"class":526},": {\n",[516,626,627,630,632,635],{"class":518,"line":562},[516,628,629],{"class":607},"    \"dev\"",[516,631,611],{"class":526},[516,633,634],{"class":533},"\"nitro dev\"",[516,636,571],{"class":526},[516,638,639,642,644],{"class":518,"line":574},[516,640,641],{"class":607},"    \"build\"",[516,643,611],{"class":526},[516,645,646],{"class":533},"\"nitro build\"\n",[516,648,649],{"class":518,"line":586},[516,650,651],{"class":526},"  },\n",[516,653,655,658],{"class":518,"line":654},7,[516,656,657],{"class":607},"  \"devDependencies\"",[516,659,624],{"class":526},[516,661,663,666,668],{"class":518,"line":662},8,[516,664,665],{"class":607},"    \"nitro\"",[516,667,611],{"class":526},[516,669,670],{"class":533},"\"latest\"\n",[516,672,674],{"class":518,"line":673},9,[516,675,676],{"class":526},"  }\n",[516,678,680],{"class":518,"line":679},10,[516,681,682],{"class":526},"}\n",[506,684,686],{"className":508,"code":685,"filename":504,"language":511,"meta":5,"style":5},"import { fetch } from \"nitro\";\n\nexport default async function renderer({ url }: { req: Request; url: URL }) {\n  const apiRes = await fetch(\"/api/hello\").then((res) => res.text());\n  return new Response(\n    /* html */ `\u003C!DOCTYPE html>\n    \u003Chtml>\n    \u003Chead>\n      \u003Ctitle>Custom Renderer\u003C/title>\n    \u003C/head>\n    \u003Cbody>\n      \u003Ch1>Hello from custom renderer!\u003C/h1>\n      \u003Cp>Current path: ${url.pathname}\u003C/p>\n      \u003Cp>API says: ${apiRes}\u003C/p>\n    \u003C/body>\n    \u003C/html>`,\n    { headers: { \"content-type\": \"text/html; charset=utf-8\" } }\n  );\n}\n",[513,687,688,701,705,757,807,821,830,835,840,845,850,856,862,879,890,896,904,921,927],{"__ignoreMap":5},[516,689,690,692,695,697,699],{"class":518,"line":519},[516,691,523],{"class":522},[516,693,694],{"class":526}," { fetch } ",[516,696,530],{"class":522},[516,698,534],{"class":533},[516,700,537],{"class":526},[516,702,703],{"class":518,"line":540},[516,704,543],{"emptyLinePlaceholder":398},[516,706,707,709,711,714,717,720,723,727,730,733,736,739,741,744,747,749,751,754],{"class":518,"line":546},[516,708,549],{"class":522},[516,710,552],{"class":522},[516,712,713],{"class":522}," async",[516,715,716],{"class":522}," function",[516,718,719],{"class":555}," renderer",[516,721,722],{"class":526},"({ ",[516,724,726],{"class":725},"sQHwn","url",[516,728,729],{"class":526}," }",[516,731,732],{"class":522},":",[516,734,735],{"class":526}," { ",[516,737,738],{"class":725},"req",[516,740,732],{"class":522},[516,742,743],{"class":555}," Request",[516,745,746],{"class":526},"; ",[516,748,726],{"class":725},[516,750,732],{"class":522},[516,752,753],{"class":555}," URL",[516,755,756],{"class":526}," }) {\n",[516,758,759,762,765,768,771,774,777,780,783,786,789,792,795,798,801,804],{"class":518,"line":562},[516,760,761],{"class":522},"  const",[516,763,764],{"class":607}," apiRes",[516,766,767],{"class":522}," =",[516,769,770],{"class":522}," await",[516,772,773],{"class":555}," fetch",[516,775,776],{"class":526},"(",[516,778,779],{"class":533},"\"/api/hello\"",[516,781,782],{"class":526},").",[516,784,785],{"class":555},"then",[516,787,788],{"class":526},"((",[516,790,791],{"class":725},"res",[516,793,794],{"class":526},") ",[516,796,797],{"class":522},"=>",[516,799,800],{"class":526}," res.",[516,802,803],{"class":555},"text",[516,805,806],{"class":526},"());\n",[516,808,809,812,815,818],{"class":518,"line":574},[516,810,811],{"class":522},"  return",[516,813,814],{"class":522}," new",[516,816,817],{"class":555}," Response",[516,819,820],{"class":526},"(\n",[516,822,823,827],{"class":518,"line":586},[516,824,826],{"class":825},"sCsY4","    /* html */",[516,828,829],{"class":533}," `\u003C!DOCTYPE html>\n",[516,831,832],{"class":518,"line":654},[516,833,834],{"class":533},"    \u003Chtml>\n",[516,836,837],{"class":518,"line":662},[516,838,839],{"class":533},"    \u003Chead>\n",[516,841,842],{"class":518,"line":673},[516,843,844],{"class":533},"      \u003Ctitle>Custom Renderer\u003C/title>\n",[516,846,847],{"class":518,"line":679},[516,848,849],{"class":533},"    \u003C/head>\n",[516,851,853],{"class":518,"line":852},11,[516,854,855],{"class":533},"    \u003Cbody>\n",[516,857,859],{"class":518,"line":858},12,[516,860,861],{"class":533},"      \u003Ch1>Hello from custom renderer!\u003C/h1>\n",[516,863,865,868,870,873,876],{"class":518,"line":864},13,[516,866,867],{"class":533},"      \u003Cp>Current path: ${",[516,869,726],{"class":526},[516,871,872],{"class":533},".",[516,874,875],{"class":526},"pathname",[516,877,878],{"class":533},"}\u003C/p>\n",[516,880,882,885,888],{"class":518,"line":881},14,[516,883,884],{"class":533},"      \u003Cp>API says: ${",[516,886,887],{"class":526},"apiRes",[516,889,878],{"class":533},[516,891,893],{"class":518,"line":892},15,[516,894,895],{"class":533},"    \u003C/body>\n",[516,897,899,902],{"class":518,"line":898},16,[516,900,901],{"class":533},"    \u003C/html>`",[516,903,571],{"class":526},[516,905,907,910,913,915,918],{"class":518,"line":906},17,[516,908,909],{"class":526},"    { headers: { ",[516,911,912],{"class":533},"\"content-type\"",[516,914,611],{"class":526},[516,916,917],{"class":533},"\"text/html; charset=utf-8\"",[516,919,920],{"class":526}," } }\n",[516,922,924],{"class":518,"line":923},18,[516,925,926],{"class":526},"  );\n",[516,928,930],{"class":518,"line":929},19,[516,931,682],{"class":526},[506,933,936],{"className":592,"code":934,"filename":935,"language":595,"meta":5,"style":5},"{\n  \"extends\": \"nitro/tsconfig\"\n}\n","tsconfig.json",[513,937,938,942,952],{"__ignoreMap":5},[516,939,940],{"class":518,"line":519},[516,941,602],{"class":526},[516,943,944,947,949],{"class":518,"line":540},[516,945,946],{"class":607},"  \"extends\"",[516,948,611],{"class":526},[516,950,951],{"class":533},"\"nitro/tsconfig\"\n",[516,953,954],{"class":518,"line":546},[516,955,682],{"class":526},[506,957,960],{"className":508,"code":958,"filename":959,"language":511,"meta":5,"style":5},"import { defineConfig } from \"vite\";\nimport { nitro } from \"nitro/vite\";\n\nexport default defineConfig({ plugins: [nitro()] });\n","vite.config.ts",[513,961,962,975,989,993],{"__ignoreMap":5},[516,963,964,966,968,970,973],{"class":518,"line":519},[516,965,523],{"class":522},[516,967,527],{"class":526},[516,969,530],{"class":522},[516,971,972],{"class":533}," \"vite\"",[516,974,537],{"class":526},[516,976,977,979,982,984,987],{"class":518,"line":540},[516,978,523],{"class":522},[516,980,981],{"class":526}," { nitro } ",[516,983,530],{"class":522},[516,985,986],{"class":533}," \"nitro/vite\"",[516,988,537],{"class":526},[516,990,991],{"class":518,"line":546},[516,992,543],{"emptyLinePlaceholder":398},[516,994,995,997,999,1001,1004,1007],{"class":518,"line":562},[516,996,549],{"class":522},[516,998,552],{"class":522},[516,1000,556],{"class":555},[516,1002,1003],{"class":526},"({ plugins: [",[516,1005,1006],{"class":555},"nitro",[516,1008,1009],{"class":526},"()] });\n",[506,1011,1014],{"className":508,"code":1012,"filename":1013,"language":511,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler(() => \"Nitro is amazing!\");\n","api/hello.ts",[513,1015,1016,1029,1033],{"__ignoreMap":5},[516,1017,1018,1020,1023,1025,1027],{"class":518,"line":519},[516,1019,523],{"class":522},[516,1021,1022],{"class":526}," { defineHandler } ",[516,1024,530],{"class":522},[516,1026,534],{"class":533},[516,1028,537],{"class":526},[516,1030,1031],{"class":518,"line":540},[516,1032,543],{"emptyLinePlaceholder":398},[516,1034,1035,1037,1039,1042,1045,1047,1050],{"class":518,"line":546},[516,1036,549],{"class":522},[516,1038,552],{"class":522},[516,1040,1041],{"class":555}," defineHandler",[516,1043,1044],{"class":526},"(() ",[516,1046,797],{"class":522},[516,1048,1049],{"class":533}," \"Nitro is amazing!\"",[516,1051,1052],{"class":526},");\n",[1054,1055,1056,1057,1060],"p",{},"Create a custom renderer that generates HTML responses with data from API routes. Use Nitro's internal ",[513,1058,1059],{},"fetch"," to call routes without network overhead.",[1062,1063,18],"h2",{"id":1064},"renderer",[506,1066,1067],{"className":508,"code":685,"filename":504,"language":511,"meta":5,"style":5},[513,1068,1069,1081,1085,1123,1157,1167,1173,1177,1181,1185,1189,1193,1197,1209,1217,1221,1227,1239,1243],{"__ignoreMap":5},[516,1070,1071,1073,1075,1077,1079],{"class":518,"line":519},[516,1072,523],{"class":522},[516,1074,694],{"class":526},[516,1076,530],{"class":522},[516,1078,534],{"class":533},[516,1080,537],{"class":526},[516,1082,1083],{"class":518,"line":540},[516,1084,543],{"emptyLinePlaceholder":398},[516,1086,1087,1089,1091,1093,1095,1097,1099,1101,1103,1105,1107,1109,1111,1113,1115,1117,1119,1121],{"class":518,"line":546},[516,1088,549],{"class":522},[516,1090,552],{"class":522},[516,1092,713],{"class":522},[516,1094,716],{"class":522},[516,1096,719],{"class":555},[516,1098,722],{"class":526},[516,1100,726],{"class":725},[516,1102,729],{"class":526},[516,1104,732],{"class":522},[516,1106,735],{"class":526},[516,1108,738],{"class":725},[516,1110,732],{"class":522},[516,1112,743],{"class":555},[516,1114,746],{"class":526},[516,1116,726],{"class":725},[516,1118,732],{"class":522},[516,1120,753],{"class":555},[516,1122,756],{"class":526},[516,1124,1125,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1155],{"class":518,"line":562},[516,1126,761],{"class":522},[516,1128,764],{"class":607},[516,1130,767],{"class":522},[516,1132,770],{"class":522},[516,1134,773],{"class":555},[516,1136,776],{"class":526},[516,1138,779],{"class":533},[516,1140,782],{"class":526},[516,1142,785],{"class":555},[516,1144,788],{"class":526},[516,1146,791],{"class":725},[516,1148,794],{"class":526},[516,1150,797],{"class":522},[516,1152,800],{"class":526},[516,1154,803],{"class":555},[516,1156,806],{"class":526},[516,1158,1159,1161,1163,1165],{"class":518,"line":574},[516,1160,811],{"class":522},[516,1162,814],{"class":522},[516,1164,817],{"class":555},[516,1166,820],{"class":526},[516,1168,1169,1171],{"class":518,"line":586},[516,1170,826],{"class":825},[516,1172,829],{"class":533},[516,1174,1175],{"class":518,"line":654},[516,1176,834],{"class":533},[516,1178,1179],{"class":518,"line":662},[516,1180,839],{"class":533},[516,1182,1183],{"class":518,"line":673},[516,1184,844],{"class":533},[516,1186,1187],{"class":518,"line":679},[516,1188,849],{"class":533},[516,1190,1191],{"class":518,"line":852},[516,1192,855],{"class":533},[516,1194,1195],{"class":518,"line":858},[516,1196,861],{"class":533},[516,1198,1199,1201,1203,1205,1207],{"class":518,"line":864},[516,1200,867],{"class":533},[516,1202,726],{"class":526},[516,1204,872],{"class":533},[516,1206,875],{"class":526},[516,1208,878],{"class":533},[516,1210,1211,1213,1215],{"class":518,"line":881},[516,1212,884],{"class":533},[516,1214,887],{"class":526},[516,1216,878],{"class":533},[516,1218,1219],{"class":518,"line":892},[516,1220,895],{"class":533},[516,1222,1223,1225],{"class":518,"line":898},[516,1224,901],{"class":533},[516,1226,571],{"class":526},[516,1228,1229,1231,1233,1235,1237],{"class":518,"line":906},[516,1230,909],{"class":526},[516,1232,912],{"class":533},[516,1234,611],{"class":526},[516,1236,917],{"class":533},[516,1238,920],{"class":526},[516,1240,1241],{"class":518,"line":923},[516,1242,926],{"class":526},[516,1244,1245],{"class":518,"line":929},[516,1246,682],{"class":526},[1054,1248,1249,1250,1252,1253,872],{},"Nitro auto-detects ",[513,1251,504],{}," in your project root and uses it for all non-API routes. The renderer function receives the request URL and returns a ",[513,1254,1255],{},"Response",[1054,1257,1258,1259,1261,1262,1264],{},"Use ",[513,1260,1059],{}," from ",[513,1263,1006],{}," to call API routes without network overhead—these requests stay in-process.",[1062,1266,1268],{"id":1267},"api-route","API Route",[506,1270,1271],{"className":508,"code":1012,"filename":1013,"language":511,"meta":5,"style":5},[513,1272,1273,1285,1289],{"__ignoreMap":5},[516,1274,1275,1277,1279,1281,1283],{"class":518,"line":519},[516,1276,523],{"class":522},[516,1278,1022],{"class":526},[516,1280,530],{"class":522},[516,1282,534],{"class":533},[516,1284,537],{"class":526},[516,1286,1287],{"class":518,"line":540},[516,1288,543],{"emptyLinePlaceholder":398},[516,1290,1291,1293,1295,1297,1299,1301,1303],{"class":518,"line":546},[516,1292,549],{"class":522},[516,1294,552],{"class":522},[516,1296,1041],{"class":555},[516,1298,1044],{"class":526},[516,1300,797],{"class":522},[516,1302,1049],{"class":533},[516,1304,1052],{"class":526},[1054,1306,1307,1308,1311,1312,1315],{},"Define API routes in the ",[513,1309,1310],{},"api/"," directory. When the renderer calls ",[513,1313,1314],{},"fetch(\"/api/hello\")",", this handler runs and returns its response.",[1062,1317,1319],{"id":1318},"learn-more","Learn More",[1321,1322,1323],"ul",{},[1324,1325,1326],"li",{},[1327,1328,18],"a",{"href":19},[1330,1331,1332],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":5,"searchDepth":540,"depth":540,"links":1334},[1335,1336,1337],{"id":1064,"depth":540,"text":18},{"id":1267,"depth":540,"text":1268},{"id":1318,"depth":540,"text":1319},"md",{"automd":398,"category":438,"icon":305},{"icon":305},{"title":302,"description":446},"pB5NSlU9xhxfDCvcvInI1R4uIwTt7OyQkoOCAgF9pD0",[1344,1345],{"title":53,"path":298,"stem":299,"description":443,"icon":300,"children":-1},{"title":307,"path":308,"stem":309,"description":449,"icon":310,"children":-1},1775834866352]