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