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