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