[{"data":1,"prerenderedAt":1345},["ShallowReactive",2],{"navigation":3,"examples-nav":393,"-examples-renderer":494,"-examples-renderer-surround":1342},[4,88,217,223,378,390],{"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},"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},"WebSocket","/docs/websocket","1.docs/50.websocket","ri:broadcast-fill",{"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":48,"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":58,"path":375,"stem":376,"icon":377},"/examples/websocket","4.examples/websocket","i-lucide-radio",{"title":379,"path":380,"stem":381,"children":382},"Blog","/blog","9.blog",[383,386],{"title":379,"path":380,"stem":384,"icon":385},"9.blog/index","i-lucide-file-text",{"title":387,"path":388,"stem":389,"icon":385},"Nitro v3 Beta is here!","/blog/v3-beta","9.blog/1.v3-beta",{"title":5,"path":391,"stem":392},"/","index",[394,399,403,406,409,412,416,419,422,425,428,431,434,438,441,444,447,450,453,457,460,464,467,470,473,476,479,482,485,488,491],{"title":231,"description":395,"meta":396,"path":232},"File-based API routing with HTTP method support and dynamic parameters.",{"automd":397,"category":398,"icon":234},true,"features",{"title":236,"description":400,"meta":401,"path":237},"Automatic imports for utilities and composables.",{"automd":397,"category":402,"icon":239},"config",{"title":241,"description":404,"meta":405,"path":242},"Cache route responses with configurable bypass logic.",{"automd":397,"category":398,"icon":244},{"title":246,"description":407,"meta":408,"path":247},"Customize error responses with a global error handler.",{"automd":397,"category":398,"icon":249},{"title":38,"description":410,"meta":411,"path":251},"Built-in database support with SQL template literals.",{"automd":397,"category":398,"icon":253},{"title":255,"description":413,"meta":414,"path":256},"Integrate Elysia with Nitro using the server entry.",{"automd":397,"category":415,"icon":258},"backend frameworks",{"title":260,"description":417,"meta":418,"path":261},"Integrate Express with Nitro using the server entry.",{"automd":397,"category":415,"icon":263},{"title":265,"description":420,"meta":421,"path":266},"Integrate Fastify with Nitro using the server entry.",{"automd":397,"category":415,"icon":268},{"title":270,"description":423,"meta":424,"path":271},"Minimal Nitro server using the web standard fetch handler.",{"automd":397,"category":398,"icon":273},{"title":275,"description":426,"meta":427,"path":276},"Integrate Hono with Nitro using the server entry.",{"automd":397,"category":415,"icon":278},{"title":280,"description":429,"meta":430,"path":281},"Custom import aliases for cleaner module paths.",{"automd":397,"category":402,"icon":283},{"title":285,"description":432,"meta":433,"path":286},"Request middleware for authentication, logging, and request modification.",{"automd":397,"category":398,"icon":46},{"title":289,"description":435,"meta":436,"path":290},"Server-side JSX rendering in Nitro with mono-jsx.",{"automd":397,"category":437,"icon":292},"server side rendering",{"title":294,"description":439,"meta":440,"path":295},"Server-side JSX rendering in Nitro with nano-jsx.",{"automd":397,"category":437,"icon":292},{"title":48,"description":442,"meta":443,"path":298},"Extend Nitro with custom plugins for hooks and lifecycle events.",{"automd":397,"category":398,"icon":300},{"title":302,"description":445,"meta":446,"path":303},"Build a custom HTML renderer in Nitro with server-side data fetching.",{"automd":397,"category":437,"icon":305},{"title":307,"description":448,"meta":449,"path":308},"Environment-aware configuration with runtime access.",{"automd":397,"category":402,"icon":310},{"title":312,"description":451,"meta":452,"path":313},"Internal server-to-server requests without network overhead.",{"automd":397,"category":398,"icon":315},{"title":317,"description":454,"meta":455,"path":318},"Server-side syntax highlighting in Nitro with Shiki.",{"automd":397,"category":456,"icon":320},"integrations",{"title":322,"description":458,"meta":459,"path":323},"Define routes programmatically using Nitro's virtual module system.",{"automd":397,"category":398,"icon":325},{"title":327,"description":461,"meta":462,"path":328},"Use Nitro as a Vite plugin for programmatic configuration.",{"automd":397,"category":463,"icon":330},"vite",{"title":332,"description":465,"meta":466,"path":333},"React Server Components with Vite and Nitro.",{"automd":397,"category":463,"icon":335},{"title":337,"description":468,"meta":469,"path":338},"Server-side rendering with vanilla HTML, Vite, and Nitro.",{"automd":397,"category":437,"icon":340},{"title":342,"description":471,"meta":472,"path":343},"Server-side rendering with Preact in Nitro using Vite.",{"automd":397,"category":437,"icon":345},{"title":347,"description":474,"meta":475,"path":348},"Server-side rendering with React in Nitro using Vite.",{"automd":397,"category":437,"icon":335},{"title":351,"description":477,"meta":478,"path":352},"Server-side rendering with SolidJS in Nitro using Vite.",{"automd":397,"category":437,"icon":354},{"title":356,"description":480,"meta":481,"path":357},"Client-side routing with TanStack Router in Nitro using Vite.",{"automd":397,"category":437,"icon":359},{"title":361,"description":483,"meta":484,"path":362},"Full-stack React with TanStack Start in Nitro using Vite.",{"automd":397,"category":437,"icon":359},{"title":365,"description":486,"meta":487,"path":366},"Server-side rendering with Vue Router in Nitro using Vite.",{"automd":397,"category":437,"icon":368},{"title":370,"description":489,"meta":490,"path":371},"End-to-end typesafe APIs with tRPC in Nitro using Vite.",{"automd":397,"category":463,"icon":373},{"title":58,"description":492,"meta":493,"path":375},"Real-time bidirectional communication with WebSocket support.",{"automd":397,"category":398,"icon":377},{"id":495,"title":302,"body":496,"description":445,"extension":1337,"meta":1338,"navigation":1339,"path":303,"seo":1340,"stem":304,"__hash__":1341},"content/4.examples/renderer.md",{"type":497,"value":498,"toc":1332,"icon":305},"minimark",[499,1052,1060,1064,1246,1255,1264,1268,1304,1315,1319,1328],[500,501,504,589,682,931,955,1009],"code-tree",{":expand-all":502,"default-value":503},"true","renderer.ts",[505,506,511],"pre",{"className":507,"code":508,"filename":509,"language":510,"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",[512,513,514,537,543,559,571,583],"code",{"__ignoreMap":5},[515,516,519,523,527,530,534],"span",{"class":517,"line":518},"line",1,[515,520,522],{"class":521},"so5gQ","import",[515,524,526],{"class":525},"slsVL"," { defineConfig } ",[515,528,529],{"class":521},"from",[515,531,533],{"class":532},"sfrk1"," \"nitro\"",[515,535,536],{"class":525},";\n",[515,538,540],{"class":517,"line":539},2,[515,541,542],{"emptyLinePlaceholder":397},"\n",[515,544,546,549,552,556],{"class":517,"line":545},3,[515,547,548],{"class":521},"export",[515,550,551],{"class":521}," default",[515,553,555],{"class":554},"shcOC"," defineConfig",[515,557,558],{"class":525},"({\n",[515,560,562,565,568],{"class":517,"line":561},4,[515,563,564],{"class":525},"  serverDir: ",[515,566,567],{"class":532},"\"./\"",[515,569,570],{"class":525},",\n",[515,572,574,577,580],{"class":517,"line":573},5,[515,575,576],{"class":525},"  renderer: { handler: ",[515,578,579],{"class":532},"\"./renderer\"",[515,581,582],{"class":525}," },\n",[515,584,586],{"class":517,"line":585},6,[515,587,588],{"class":525},"});\n",[505,590,595],{"className":591,"code":592,"filename":593,"language":594,"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",[512,596,597,602,616,624,636,646,651,659,670,676],{"__ignoreMap":5},[515,598,599],{"class":517,"line":518},[515,600,601],{"class":525},"{\n",[515,603,604,608,611,614],{"class":517,"line":539},[515,605,607],{"class":606},"suiK_","  \"type\"",[515,609,610],{"class":525},": ",[515,612,613],{"class":532},"\"module\"",[515,615,570],{"class":525},[515,617,618,621],{"class":517,"line":545},[515,619,620],{"class":606},"  \"scripts\"",[515,622,623],{"class":525},": {\n",[515,625,626,629,631,634],{"class":517,"line":561},[515,627,628],{"class":606},"    \"dev\"",[515,630,610],{"class":525},[515,632,633],{"class":532},"\"nitro dev\"",[515,635,570],{"class":525},[515,637,638,641,643],{"class":517,"line":573},[515,639,640],{"class":606},"    \"build\"",[515,642,610],{"class":525},[515,644,645],{"class":532},"\"nitro build\"\n",[515,647,648],{"class":517,"line":585},[515,649,650],{"class":525},"  },\n",[515,652,654,657],{"class":517,"line":653},7,[515,655,656],{"class":606},"  \"devDependencies\"",[515,658,623],{"class":525},[515,660,662,665,667],{"class":517,"line":661},8,[515,663,664],{"class":606},"    \"nitro\"",[515,666,610],{"class":525},[515,668,669],{"class":532},"\"latest\"\n",[515,671,673],{"class":517,"line":672},9,[515,674,675],{"class":525},"  }\n",[515,677,679],{"class":517,"line":678},10,[515,680,681],{"class":525},"}\n",[505,683,685],{"className":507,"code":684,"filename":503,"language":510,"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",[512,686,687,700,704,756,806,820,829,834,839,844,849,855,861,878,889,895,903,920,926],{"__ignoreMap":5},[515,688,689,691,694,696,698],{"class":517,"line":518},[515,690,522],{"class":521},[515,692,693],{"class":525}," { fetch } ",[515,695,529],{"class":521},[515,697,533],{"class":532},[515,699,536],{"class":525},[515,701,702],{"class":517,"line":539},[515,703,542],{"emptyLinePlaceholder":397},[515,705,706,708,710,713,716,719,722,726,729,732,735,738,740,743,746,748,750,753],{"class":517,"line":545},[515,707,548],{"class":521},[515,709,551],{"class":521},[515,711,712],{"class":521}," async",[515,714,715],{"class":521}," function",[515,717,718],{"class":554}," renderer",[515,720,721],{"class":525},"({ ",[515,723,725],{"class":724},"sQHwn","url",[515,727,728],{"class":525}," }",[515,730,731],{"class":521},":",[515,733,734],{"class":525}," { ",[515,736,737],{"class":724},"req",[515,739,731],{"class":521},[515,741,742],{"class":554}," Request",[515,744,745],{"class":525},"; ",[515,747,725],{"class":724},[515,749,731],{"class":521},[515,751,752],{"class":554}," URL",[515,754,755],{"class":525}," }) {\n",[515,757,758,761,764,767,770,773,776,779,782,785,788,791,794,797,800,803],{"class":517,"line":561},[515,759,760],{"class":521},"  const",[515,762,763],{"class":606}," apiRes",[515,765,766],{"class":521}," =",[515,768,769],{"class":521}," await",[515,771,772],{"class":554}," fetch",[515,774,775],{"class":525},"(",[515,777,778],{"class":532},"\"/api/hello\"",[515,780,781],{"class":525},").",[515,783,784],{"class":554},"then",[515,786,787],{"class":525},"((",[515,789,790],{"class":724},"res",[515,792,793],{"class":525},") ",[515,795,796],{"class":521},"=>",[515,798,799],{"class":525}," res.",[515,801,802],{"class":554},"text",[515,804,805],{"class":525},"());\n",[515,807,808,811,814,817],{"class":517,"line":573},[515,809,810],{"class":521},"  return",[515,812,813],{"class":521}," new",[515,815,816],{"class":554}," Response",[515,818,819],{"class":525},"(\n",[515,821,822,826],{"class":517,"line":585},[515,823,825],{"class":824},"sCsY4","    /* html */",[515,827,828],{"class":532}," `\u003C!DOCTYPE html>\n",[515,830,831],{"class":517,"line":653},[515,832,833],{"class":532},"    \u003Chtml>\n",[515,835,836],{"class":517,"line":661},[515,837,838],{"class":532},"    \u003Chead>\n",[515,840,841],{"class":517,"line":672},[515,842,843],{"class":532},"      \u003Ctitle>Custom Renderer\u003C/title>\n",[515,845,846],{"class":517,"line":678},[515,847,848],{"class":532},"    \u003C/head>\n",[515,850,852],{"class":517,"line":851},11,[515,853,854],{"class":532},"    \u003Cbody>\n",[515,856,858],{"class":517,"line":857},12,[515,859,860],{"class":532},"      \u003Ch1>Hello from custom renderer!\u003C/h1>\n",[515,862,864,867,869,872,875],{"class":517,"line":863},13,[515,865,866],{"class":532},"      \u003Cp>Current path: ${",[515,868,725],{"class":525},[515,870,871],{"class":532},".",[515,873,874],{"class":525},"pathname",[515,876,877],{"class":532},"}\u003C/p>\n",[515,879,881,884,887],{"class":517,"line":880},14,[515,882,883],{"class":532},"      \u003Cp>API says: ${",[515,885,886],{"class":525},"apiRes",[515,888,877],{"class":532},[515,890,892],{"class":517,"line":891},15,[515,893,894],{"class":532},"    \u003C/body>\n",[515,896,898,901],{"class":517,"line":897},16,[515,899,900],{"class":532},"    \u003C/html>`",[515,902,570],{"class":525},[515,904,906,909,912,914,917],{"class":517,"line":905},17,[515,907,908],{"class":525},"    { headers: { ",[515,910,911],{"class":532},"\"content-type\"",[515,913,610],{"class":525},[515,915,916],{"class":532},"\"text/html; charset=utf-8\"",[515,918,919],{"class":525}," } }\n",[515,921,923],{"class":517,"line":922},18,[515,924,925],{"class":525},"  );\n",[515,927,929],{"class":517,"line":928},19,[515,930,681],{"class":525},[505,932,935],{"className":591,"code":933,"filename":934,"language":594,"meta":5,"style":5},"{\n  \"extends\": \"nitro/tsconfig\"\n}\n","tsconfig.json",[512,936,937,941,951],{"__ignoreMap":5},[515,938,939],{"class":517,"line":518},[515,940,601],{"class":525},[515,942,943,946,948],{"class":517,"line":539},[515,944,945],{"class":606},"  \"extends\"",[515,947,610],{"class":525},[515,949,950],{"class":532},"\"nitro/tsconfig\"\n",[515,952,953],{"class":517,"line":545},[515,954,681],{"class":525},[505,956,959],{"className":507,"code":957,"filename":958,"language":510,"meta":5,"style":5},"import { defineConfig } from \"vite\";\nimport { nitro } from \"nitro/vite\";\n\nexport default defineConfig({ plugins: [nitro()] });\n","vite.config.ts",[512,960,961,974,988,992],{"__ignoreMap":5},[515,962,963,965,967,969,972],{"class":517,"line":518},[515,964,522],{"class":521},[515,966,526],{"class":525},[515,968,529],{"class":521},[515,970,971],{"class":532}," \"vite\"",[515,973,536],{"class":525},[515,975,976,978,981,983,986],{"class":517,"line":539},[515,977,522],{"class":521},[515,979,980],{"class":525}," { nitro } ",[515,982,529],{"class":521},[515,984,985],{"class":532}," \"nitro/vite\"",[515,987,536],{"class":525},[515,989,990],{"class":517,"line":545},[515,991,542],{"emptyLinePlaceholder":397},[515,993,994,996,998,1000,1003,1006],{"class":517,"line":561},[515,995,548],{"class":521},[515,997,551],{"class":521},[515,999,555],{"class":554},[515,1001,1002],{"class":525},"({ plugins: [",[515,1004,1005],{"class":554},"nitro",[515,1007,1008],{"class":525},"()] });\n",[505,1010,1013],{"className":507,"code":1011,"filename":1012,"language":510,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler(() => \"Nitro is amazing!\");\n","api/hello.ts",[512,1014,1015,1028,1032],{"__ignoreMap":5},[515,1016,1017,1019,1022,1024,1026],{"class":517,"line":518},[515,1018,522],{"class":521},[515,1020,1021],{"class":525}," { defineHandler } ",[515,1023,529],{"class":521},[515,1025,533],{"class":532},[515,1027,536],{"class":525},[515,1029,1030],{"class":517,"line":539},[515,1031,542],{"emptyLinePlaceholder":397},[515,1033,1034,1036,1038,1041,1044,1046,1049],{"class":517,"line":545},[515,1035,548],{"class":521},[515,1037,551],{"class":521},[515,1039,1040],{"class":554}," defineHandler",[515,1042,1043],{"class":525},"(() ",[515,1045,796],{"class":521},[515,1047,1048],{"class":532}," \"Nitro is amazing!\"",[515,1050,1051],{"class":525},");\n",[1053,1054,1055,1056,1059],"p",{},"Create a custom renderer that generates HTML responses with data from API routes. Use Nitro's internal ",[512,1057,1058],{},"fetch"," to call routes without network overhead.",[1061,1062,18],"h2",{"id":1063},"renderer",[505,1065,1066],{"className":507,"code":684,"filename":503,"language":510,"meta":5,"style":5},[512,1067,1068,1080,1084,1122,1156,1166,1172,1176,1180,1184,1188,1192,1196,1208,1216,1220,1226,1238,1242],{"__ignoreMap":5},[515,1069,1070,1072,1074,1076,1078],{"class":517,"line":518},[515,1071,522],{"class":521},[515,1073,693],{"class":525},[515,1075,529],{"class":521},[515,1077,533],{"class":532},[515,1079,536],{"class":525},[515,1081,1082],{"class":517,"line":539},[515,1083,542],{"emptyLinePlaceholder":397},[515,1085,1086,1088,1090,1092,1094,1096,1098,1100,1102,1104,1106,1108,1110,1112,1114,1116,1118,1120],{"class":517,"line":545},[515,1087,548],{"class":521},[515,1089,551],{"class":521},[515,1091,712],{"class":521},[515,1093,715],{"class":521},[515,1095,718],{"class":554},[515,1097,721],{"class":525},[515,1099,725],{"class":724},[515,1101,728],{"class":525},[515,1103,731],{"class":521},[515,1105,734],{"class":525},[515,1107,737],{"class":724},[515,1109,731],{"class":521},[515,1111,742],{"class":554},[515,1113,745],{"class":525},[515,1115,725],{"class":724},[515,1117,731],{"class":521},[515,1119,752],{"class":554},[515,1121,755],{"class":525},[515,1123,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,1152,1154],{"class":517,"line":561},[515,1125,760],{"class":521},[515,1127,763],{"class":606},[515,1129,766],{"class":521},[515,1131,769],{"class":521},[515,1133,772],{"class":554},[515,1135,775],{"class":525},[515,1137,778],{"class":532},[515,1139,781],{"class":525},[515,1141,784],{"class":554},[515,1143,787],{"class":525},[515,1145,790],{"class":724},[515,1147,793],{"class":525},[515,1149,796],{"class":521},[515,1151,799],{"class":525},[515,1153,802],{"class":554},[515,1155,805],{"class":525},[515,1157,1158,1160,1162,1164],{"class":517,"line":573},[515,1159,810],{"class":521},[515,1161,813],{"class":521},[515,1163,816],{"class":554},[515,1165,819],{"class":525},[515,1167,1168,1170],{"class":517,"line":585},[515,1169,825],{"class":824},[515,1171,828],{"class":532},[515,1173,1174],{"class":517,"line":653},[515,1175,833],{"class":532},[515,1177,1178],{"class":517,"line":661},[515,1179,838],{"class":532},[515,1181,1182],{"class":517,"line":672},[515,1183,843],{"class":532},[515,1185,1186],{"class":517,"line":678},[515,1187,848],{"class":532},[515,1189,1190],{"class":517,"line":851},[515,1191,854],{"class":532},[515,1193,1194],{"class":517,"line":857},[515,1195,860],{"class":532},[515,1197,1198,1200,1202,1204,1206],{"class":517,"line":863},[515,1199,866],{"class":532},[515,1201,725],{"class":525},[515,1203,871],{"class":532},[515,1205,874],{"class":525},[515,1207,877],{"class":532},[515,1209,1210,1212,1214],{"class":517,"line":880},[515,1211,883],{"class":532},[515,1213,886],{"class":525},[515,1215,877],{"class":532},[515,1217,1218],{"class":517,"line":891},[515,1219,894],{"class":532},[515,1221,1222,1224],{"class":517,"line":897},[515,1223,900],{"class":532},[515,1225,570],{"class":525},[515,1227,1228,1230,1232,1234,1236],{"class":517,"line":905},[515,1229,908],{"class":525},[515,1231,911],{"class":532},[515,1233,610],{"class":525},[515,1235,916],{"class":532},[515,1237,919],{"class":525},[515,1239,1240],{"class":517,"line":922},[515,1241,925],{"class":525},[515,1243,1244],{"class":517,"line":928},[515,1245,681],{"class":525},[1053,1247,1248,1249,1251,1252,871],{},"Nitro auto-detects ",[512,1250,503],{}," in your project root and uses it for all non-API routes. The renderer function receives the request URL and returns a ",[512,1253,1254],{},"Response",[1053,1256,1257,1258,1260,1261,1263],{},"Use ",[512,1259,1058],{}," from ",[512,1262,1005],{}," to call API routes without network overhead—these requests stay in-process.",[1061,1265,1267],{"id":1266},"api-route","API Route",[505,1269,1270],{"className":507,"code":1011,"filename":1012,"language":510,"meta":5,"style":5},[512,1271,1272,1284,1288],{"__ignoreMap":5},[515,1273,1274,1276,1278,1280,1282],{"class":517,"line":518},[515,1275,522],{"class":521},[515,1277,1021],{"class":525},[515,1279,529],{"class":521},[515,1281,533],{"class":532},[515,1283,536],{"class":525},[515,1285,1286],{"class":517,"line":539},[515,1287,542],{"emptyLinePlaceholder":397},[515,1289,1290,1292,1294,1296,1298,1300,1302],{"class":517,"line":545},[515,1291,548],{"class":521},[515,1293,551],{"class":521},[515,1295,1040],{"class":554},[515,1297,1043],{"class":525},[515,1299,796],{"class":521},[515,1301,1048],{"class":532},[515,1303,1051],{"class":525},[1053,1305,1306,1307,1310,1311,1314],{},"Define API routes in the ",[512,1308,1309],{},"api/"," directory. When the renderer calls ",[512,1312,1313],{},"fetch(\"/api/hello\")",", this handler runs and returns its response.",[1061,1316,1318],{"id":1317},"learn-more","Learn More",[1320,1321,1322],"ul",{},[1323,1324,1325],"li",{},[1326,1327,18],"a",{"href":19},[1329,1330,1331],"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":539,"depth":539,"links":1333},[1334,1335,1336],{"id":1063,"depth":539,"text":18},{"id":1266,"depth":539,"text":1267},{"id":1317,"depth":539,"text":1318},"md",{"automd":397,"category":437,"icon":305},{"icon":305},{"title":302,"description":445},"pB5NSlU9xhxfDCvcvInI1R4uIwTt7OyQkoOCAgF9pD0",[1343,1344],{"title":48,"path":298,"stem":299,"description":442,"icon":300,"children":-1},{"title":307,"path":308,"stem":309,"description":448,"icon":310,"children":-1},1775753660168]