[{"data":1,"prerenderedAt":2519},["ShallowReactive",2],{"navigation":3,"-docs-renderer":393,"-docs-renderer-surround":2514},[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",{"id":394,"title":395,"body":396,"description":2509,"extension":2231,"meta":2510,"navigation":2511,"path":19,"seo":2512,"stem":20,"__hash__":2513},"content/1.docs/4.renderer.md","Nitro Renderer",{"type":397,"value":398,"toc":2488,"icon":21},"minimark",[399,403,407,415,534,605,616,620,627,633,636,903,914,917,939,943,950,1144,1148,1157,1163,1224,1227,1231,1240,1245,1263,1306,1310,1317,1450,1454,1460,1542,1546,1553,1613,1617,1620,1707,1711,1768,1939,1943,1947,1950,1960,2128,2131,2181,2193,2197,2208,2227,2259,2269,2271,2275,2278,2282,2292,2299,2312,2455,2459,2465,2469,2473,2479,2484],[400,401,402],"p",{},"The renderer is a special handler in Nitro that catches all routes that don't match any specific API or route handler. It's commonly used for server-side rendering (SSR), serving single-page applications (SPAs), or creating custom HTML responses.",[404,405,33],"h2",{"id":406},"configuration",[400,408,409,410,414],{},"The renderer is configured using the ",[411,412,413],"code",{},"renderer"," option in your Nitro config:",[416,417,422],"pre",{"className":418,"code":419,"filename":420,"language":421,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  renderer: {\n    template: './index.html',  // Path to HTML template file\n    handler: './renderer.ts',  // Path to custom renderer handler\n    static: false,             // Treat template as static HTML (no rendu processing)\n  }\n})\n","nitro.config.ts","ts",[411,423,424,447,454,470,476,492,506,522,528],{"__ignoreMap":5},[425,426,429,433,437,440,444],"span",{"class":427,"line":428},"line",1,[425,430,432],{"class":431},"so5gQ","import",[425,434,436],{"class":435},"slsVL"," { defineNitroConfig } ",[425,438,439],{"class":431},"from",[425,441,443],{"class":442},"sfrk1"," \"nitro/config\"",[425,445,446],{"class":435},";\n",[425,448,450],{"class":427,"line":449},2,[425,451,453],{"emptyLinePlaceholder":452},true,"\n",[425,455,457,460,463,467],{"class":427,"line":456},3,[425,458,459],{"class":431},"export",[425,461,462],{"class":431}," default",[425,464,466],{"class":465},"shcOC"," defineNitroConfig",[425,468,469],{"class":435},"({\n",[425,471,473],{"class":427,"line":472},4,[425,474,475],{"class":435},"  renderer: {\n",[425,477,479,482,485,488],{"class":427,"line":478},5,[425,480,481],{"class":435},"    template: ",[425,483,484],{"class":442},"'./index.html'",[425,486,487],{"class":435},",  ",[425,489,491],{"class":490},"sCsY4","// Path to HTML template file\n",[425,493,495,498,501,503],{"class":427,"line":494},6,[425,496,497],{"class":435},"    handler: ",[425,499,500],{"class":442},"'./renderer.ts'",[425,502,487],{"class":435},[425,504,505],{"class":490},"// Path to custom renderer handler\n",[425,507,509,512,516,519],{"class":427,"line":508},7,[425,510,511],{"class":435},"    static: ",[425,513,515],{"class":514},"suiK_","false",[425,517,518],{"class":435},",             ",[425,520,521],{"class":490},"// Treat template as static HTML (no rendu processing)\n",[425,523,525],{"class":427,"line":524},8,[425,526,527],{"class":435},"  }\n",[425,529,531],{"class":427,"line":530},9,[425,532,533],{"class":435},"})\n",[535,536,537,553],"table",{},[538,539,540],"thead",{},[541,542,543,547,550],"tr",{},[544,545,546],"th",{},"Option",[544,548,549],{},"Type",[544,551,552],{},"Description",[554,555,556,572,586],"tbody",{},[541,557,558,564,569],{},[559,560,561],"td",{},[411,562,563],{},"template",[559,565,566],{},[411,567,568],{},"string",[559,570,571],{},"Path to an HTML file used as the renderer template.",[541,573,574,579,583],{},[559,575,576],{},[411,577,578],{},"handler",[559,580,581],{},[411,582,568],{},[559,584,585],{},"Path to a custom renderer handler module.",[541,587,588,593,598],{},[559,589,590],{},[411,591,592],{},"static",[559,594,595],{},[411,596,597],{},"boolean",[559,599,600,601,604],{},"When ",[411,602,603],{},"true",", skips rendu template processing and serves the HTML as-is. Auto-detected based on template syntax when not set.",[400,606,607,608,611,612,615],{},"Set ",[411,609,610],{},"renderer: false"," in the config to explicitly disable the renderer entirely (including auto-detection of ",[411,613,614],{},"index.html",").",[404,617,619],{"id":618},"html-template","HTML template",[621,622,624,625],"h3",{"id":623},"auto-detected-indexhtml","Auto-detected ",[411,626,614],{},[400,628,629,630,632],{},"By default, Nitro automatically looks for an ",[411,631,614],{}," file in your project src dir.",[400,634,635],{},"If found, Nitro will use it as the renderer template and serve it for all unmatched routes.",[637,638,639,835],"code-group",{},[416,640,644],{"className":641,"code":642,"filename":614,"language":643,"meta":5,"style":5},"language-html shiki shiki-themes github-light github-dark github-dark","\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n  \u003Chead>\n    \u003Cmeta charset=\"UTF-8\" />\n    \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    \u003Ctitle>My Vite + Nitro App\u003C/title>\n  \u003C/head>\n  \u003Cbody>\n    \u003Cdiv id=\"app\">\u003C/div>\n    \u003Cscript type=\"module\" src=\"/src/main.ts\">\u003C/script>\n  \u003C/body>\n\u003C/html>\n","html",[411,645,646,661,679,689,708,732,746,755,764,786,816,825],{"__ignoreMap":5},[425,647,648,651,655,658],{"class":427,"line":428},[425,649,650],{"class":435},"\u003C!",[425,652,654],{"class":653},"sByVh","DOCTYPE",[425,656,657],{"class":465}," html",[425,659,660],{"class":435},">\n",[425,662,663,666,668,671,674,677],{"class":427,"line":449},[425,664,665],{"class":435},"\u003C",[425,667,643],{"class":653},[425,669,670],{"class":465}," lang",[425,672,673],{"class":435},"=",[425,675,676],{"class":442},"\"en\"",[425,678,660],{"class":435},[425,680,681,684,687],{"class":427,"line":456},[425,682,683],{"class":435},"  \u003C",[425,685,686],{"class":653},"head",[425,688,660],{"class":435},[425,690,691,694,697,700,702,705],{"class":427,"line":472},[425,692,693],{"class":435},"    \u003C",[425,695,696],{"class":653},"meta",[425,698,699],{"class":465}," charset",[425,701,673],{"class":435},[425,703,704],{"class":442},"\"UTF-8\"",[425,706,707],{"class":435}," />\n",[425,709,710,712,714,717,719,722,725,727,730],{"class":427,"line":478},[425,711,693],{"class":435},[425,713,696],{"class":653},[425,715,716],{"class":465}," name",[425,718,673],{"class":435},[425,720,721],{"class":442},"\"viewport\"",[425,723,724],{"class":465}," content",[425,726,673],{"class":435},[425,728,729],{"class":442},"\"width=device-width, initial-scale=1.0\"",[425,731,707],{"class":435},[425,733,734,736,739,742,744],{"class":427,"line":494},[425,735,693],{"class":435},[425,737,738],{"class":653},"title",[425,740,741],{"class":435},">My Vite + Nitro App\u003C/",[425,743,738],{"class":653},[425,745,660],{"class":435},[425,747,748,751,753],{"class":427,"line":508},[425,749,750],{"class":435},"  \u003C/",[425,752,686],{"class":653},[425,754,660],{"class":435},[425,756,757,759,762],{"class":427,"line":524},[425,758,683],{"class":435},[425,760,761],{"class":653},"body",[425,763,660],{"class":435},[425,765,766,768,771,774,776,779,782,784],{"class":427,"line":530},[425,767,693],{"class":435},[425,769,770],{"class":653},"div",[425,772,773],{"class":465}," id",[425,775,673],{"class":435},[425,777,778],{"class":442},"\"app\"",[425,780,781],{"class":435},">\u003C/",[425,783,770],{"class":653},[425,785,660],{"class":435},[425,787,789,791,794,797,799,802,805,807,810,812,814],{"class":427,"line":788},10,[425,790,693],{"class":435},[425,792,793],{"class":653},"script",[425,795,796],{"class":465}," type",[425,798,673],{"class":435},[425,800,801],{"class":442},"\"module\"",[425,803,804],{"class":465}," src",[425,806,673],{"class":435},[425,808,809],{"class":442},"\"/src/main.ts\"",[425,811,781],{"class":435},[425,813,793],{"class":653},[425,815,660],{"class":435},[425,817,819,821,823],{"class":427,"line":818},11,[425,820,750],{"class":435},[425,822,761],{"class":653},[425,824,660],{"class":435},[425,826,828,831,833],{"class":427,"line":827},12,[425,829,830],{"class":435},"\u003C/",[425,832,643],{"class":653},[425,834,660],{"class":435},[416,836,839],{"className":418,"code":837,"filename":838,"language":421,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler((event) => {\n  return { hello: \"API\" };\n});\n","routes/api/hello.ts",[411,840,841,855,859,884,898],{"__ignoreMap":5},[425,842,843,845,848,850,853],{"class":427,"line":428},[425,844,432],{"class":431},[425,846,847],{"class":435}," { defineHandler } ",[425,849,439],{"class":431},[425,851,852],{"class":442}," \"nitro\"",[425,854,446],{"class":435},[425,856,857],{"class":427,"line":449},[425,858,453],{"emptyLinePlaceholder":452},[425,860,861,863,865,868,871,875,878,881],{"class":427,"line":456},[425,862,459],{"class":431},[425,864,462],{"class":431},[425,866,867],{"class":465}," defineHandler",[425,869,870],{"class":435},"((",[425,872,874],{"class":873},"sQHwn","event",[425,876,877],{"class":435},") ",[425,879,880],{"class":431},"=>",[425,882,883],{"class":435}," {\n",[425,885,886,889,892,895],{"class":427,"line":472},[425,887,888],{"class":431},"  return",[425,890,891],{"class":435}," { hello: ",[425,893,894],{"class":442},"\"API\"",[425,896,897],{"class":435}," };\n",[425,899,900],{"class":427,"line":478},[425,901,902],{"class":435},"});\n",[904,905,906],"tip",{},[400,907,600,908,910,911],{},[411,909,614],{}," is detected, Nitro will automatically log in the terminal: ",[411,912,913],{},"Using index.html as renderer template.",[400,915,916],{},"With this setup:",[918,919,920,927],"ul",{},[921,922,923,926],"li",{},[411,924,925],{},"/api/hello"," → Handled by your API routes",[921,928,929,932,933,936,937],{},[411,930,931],{},"/about",", ",[411,934,935],{},"/contact",", etc. → Served with ",[411,938,614],{},[621,940,942],{"id":941},"custom-html-file","Custom HTML file",[400,944,945,946,949],{},"You can specify a custom HTML template file using the ",[411,947,948],{},"renderer.template"," option in your Nitro configuration.",[637,951,952,1002],{},[416,953,955],{"className":418,"code":954,"filename":420,"language":421,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  renderer: {\n    template: './app.html'\n  }\n})\n",[411,956,957,969,973,983,987,994,998],{"__ignoreMap":5},[425,958,959,961,963,965,967],{"class":427,"line":428},[425,960,432],{"class":431},[425,962,436],{"class":435},[425,964,439],{"class":431},[425,966,443],{"class":442},[425,968,446],{"class":435},[425,970,971],{"class":427,"line":449},[425,972,453],{"emptyLinePlaceholder":452},[425,974,975,977,979,981],{"class":427,"line":456},[425,976,459],{"class":431},[425,978,462],{"class":431},[425,980,466],{"class":465},[425,982,469],{"class":435},[425,984,985],{"class":427,"line":472},[425,986,475],{"class":435},[425,988,989,991],{"class":427,"line":478},[425,990,481],{"class":435},[425,992,993],{"class":442},"'./app.html'\n",[425,995,996],{"class":427,"line":494},[425,997,527],{"class":435},[425,999,1000],{"class":427,"line":508},[425,1001,533],{"class":435},[416,1003,1006],{"className":641,"code":1004,"filename":1005,"language":643,"meta":5,"style":5},"\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n  \u003Chead>\n    \u003Cmeta charset=\"UTF-8\" />\n    \u003Ctitle>Custom Template\u003C/title>\n  \u003C/head>\n  \u003Cbody>\n    \u003Cdiv id=\"root\">Loading...\u003C/div>\n    \u003Cscript type=\"module\" src=\"/src/main.js\">\u003C/script>\n  \u003C/body>\n\u003C/html>\n","app.html",[411,1007,1008,1018,1032,1040,1054,1067,1075,1083,1103,1128,1136],{"__ignoreMap":5},[425,1009,1010,1012,1014,1016],{"class":427,"line":428},[425,1011,650],{"class":435},[425,1013,654],{"class":653},[425,1015,657],{"class":465},[425,1017,660],{"class":435},[425,1019,1020,1022,1024,1026,1028,1030],{"class":427,"line":449},[425,1021,665],{"class":435},[425,1023,643],{"class":653},[425,1025,670],{"class":465},[425,1027,673],{"class":435},[425,1029,676],{"class":442},[425,1031,660],{"class":435},[425,1033,1034,1036,1038],{"class":427,"line":456},[425,1035,683],{"class":435},[425,1037,686],{"class":653},[425,1039,660],{"class":435},[425,1041,1042,1044,1046,1048,1050,1052],{"class":427,"line":472},[425,1043,693],{"class":435},[425,1045,696],{"class":653},[425,1047,699],{"class":465},[425,1049,673],{"class":435},[425,1051,704],{"class":442},[425,1053,707],{"class":435},[425,1055,1056,1058,1060,1063,1065],{"class":427,"line":478},[425,1057,693],{"class":435},[425,1059,738],{"class":653},[425,1061,1062],{"class":435},">Custom Template\u003C/",[425,1064,738],{"class":653},[425,1066,660],{"class":435},[425,1068,1069,1071,1073],{"class":427,"line":494},[425,1070,750],{"class":435},[425,1072,686],{"class":653},[425,1074,660],{"class":435},[425,1076,1077,1079,1081],{"class":427,"line":508},[425,1078,683],{"class":435},[425,1080,761],{"class":653},[425,1082,660],{"class":435},[425,1084,1085,1087,1089,1091,1093,1096,1099,1101],{"class":427,"line":524},[425,1086,693],{"class":435},[425,1088,770],{"class":653},[425,1090,773],{"class":465},[425,1092,673],{"class":435},[425,1094,1095],{"class":442},"\"root\"",[425,1097,1098],{"class":435},">Loading...\u003C/",[425,1100,770],{"class":653},[425,1102,660],{"class":435},[425,1104,1105,1107,1109,1111,1113,1115,1117,1119,1122,1124,1126],{"class":427,"line":530},[425,1106,693],{"class":435},[425,1108,793],{"class":653},[425,1110,796],{"class":465},[425,1112,673],{"class":435},[425,1114,801],{"class":442},[425,1116,804],{"class":465},[425,1118,673],{"class":435},[425,1120,1121],{"class":442},"\"/src/main.js\"",[425,1123,781],{"class":435},[425,1125,793],{"class":653},[425,1127,660],{"class":435},[425,1129,1130,1132,1134],{"class":427,"line":788},[425,1131,750],{"class":435},[425,1133,761],{"class":653},[425,1135,660],{"class":435},[425,1137,1138,1140,1142],{"class":427,"line":818},[425,1139,830],{"class":435},[425,1141,643],{"class":653},[425,1143,660],{"class":435},[621,1145,1147],{"id":1146},"static-templates","Static templates",[400,1149,1150,1151,1156],{},"By default, Nitro auto-detects whether your HTML template contains ",[1152,1153,1155],"a",{"href":1154},"#hypertext-preprocessor-experimental","rendu"," syntax. If it does, the template is processed dynamically on each request. If it doesn't, it's served as static HTML.",[400,1158,1159,1160,1162],{},"You can override this behavior with the ",[411,1161,592],{}," option:",[416,1164,1166],{"className":418,"code":1165,"filename":420,"language":421,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  renderer: {\n    template: './index.html',\n    static: true // Force static serving, skip template processing\n  }\n})\n",[411,1167,1168,1180,1184,1194,1198,1207,1216,1220],{"__ignoreMap":5},[425,1169,1170,1172,1174,1176,1178],{"class":427,"line":428},[425,1171,432],{"class":431},[425,1173,436],{"class":435},[425,1175,439],{"class":431},[425,1177,443],{"class":442},[425,1179,446],{"class":435},[425,1181,1182],{"class":427,"line":449},[425,1183,453],{"emptyLinePlaceholder":452},[425,1185,1186,1188,1190,1192],{"class":427,"line":456},[425,1187,459],{"class":431},[425,1189,462],{"class":431},[425,1191,466],{"class":465},[425,1193,469],{"class":435},[425,1195,1196],{"class":427,"line":472},[425,1197,475],{"class":435},[425,1199,1200,1202,1204],{"class":427,"line":478},[425,1201,481],{"class":435},[425,1203,484],{"class":442},[425,1205,1206],{"class":435},",\n",[425,1208,1209,1211,1213],{"class":427,"line":494},[425,1210,511],{"class":435},[425,1212,603],{"class":514},[425,1214,1215],{"class":490}," // Force static serving, skip template processing\n",[425,1217,1218],{"class":427,"line":508},[425,1219,527],{"class":435},[425,1221,1222],{"class":427,"line":524},[425,1223,533],{"class":435},[400,1225,1226],{},"In production, static templates are inlined into the server bundle and served directly for optimal performance.",[621,1228,1230],{"id":1229},"hypertext-preprocessor-experimental","Hypertext Preprocessor (experimental)",[400,1232,1233,1234,1239],{},"Nitro uses ",[1152,1235,1155],{"href":1236,"rel":1237},"https://github.com/h3js/rendu",[1238],"nofollow"," Hypertext Preprocessor, which provides a simple and powerful way to create dynamic HTML templates with JavaScript expressions.",[1241,1242,1244],"h4",{"id":1243},"output-expressions","Output expressions",[918,1246,1247,1253],{},[921,1248,1249,1252],{},[411,1250,1251],{},"{{ expression }}"," — HTML-escaped output",[921,1254,1255,1258,1259,1262],{},[411,1256,1257],{},"{{{ expression }}}"," or ",[411,1260,1261],{},"\u003C?= expression ?>"," — raw (unescaped) output",[416,1264,1266],{"className":641,"code":1265,"language":643,"meta":5,"style":5},"\u003Ch1>Hello {{ $URL.pathname }}\u003C/h1>\n\u003Cdiv>{{{ '\u003Cstrong>raw html\u003C/strong>' }}}\u003C/div>\n",[411,1267,1268,1282],{"__ignoreMap":5},[425,1269,1270,1272,1275,1278,1280],{"class":427,"line":428},[425,1271,665],{"class":435},[425,1273,1274],{"class":653},"h1",[425,1276,1277],{"class":435},">Hello {{ $URL.pathname }}\u003C/",[425,1279,1274],{"class":653},[425,1281,660],{"class":435},[425,1283,1284,1286,1288,1291,1294,1297,1299,1302,1304],{"class":427,"line":449},[425,1285,665],{"class":435},[425,1287,770],{"class":653},[425,1289,1290],{"class":435},">{{{ '\u003C",[425,1292,1293],{"class":653},"strong",[425,1295,1296],{"class":435},">raw html\u003C/",[425,1298,1293],{"class":653},[425,1300,1301],{"class":435},">' }}}\u003C/",[425,1303,770],{"class":653},[425,1305,660],{"class":435},[1241,1307,1309],{"id":1308},"control-flow","Control flow",[400,1311,1312,1313,1316],{},"Use ",[411,1314,1315],{},"\u003C? ... ?>"," for JavaScript control flow:",[416,1318,1320],{"className":641,"code":1319,"language":643,"meta":5,"style":5},"\u003C? if ($METHOD === 'POST') { ?>\n  \u003Cp>Form submitted!\u003C/p>\n\u003C? } else { ?>\n  \u003Cform method=\"POST\">\n    \u003Cbutton type=\"submit\">Submit\u003C/button>\n  \u003C/form>\n\u003C? } ?>\n\n\u003Cul>\n\u003C? for (const item of ['a', 'b', 'c']) { ?>\n  \u003Cli>{{ item }}\u003C/li>\n\u003C? } ?>\n\u003C/ul>\n",[411,1321,1322,1330,1343,1350,1367,1388,1396,1403,1407,1415,1422,1435,1441],{"__ignoreMap":5},[425,1323,1324,1327],{"class":427,"line":428},[425,1325,665],{"class":1326},"sVAnh",[425,1328,1329],{"class":435},"? if ($METHOD === 'POST') { ?>\n",[425,1331,1332,1334,1336,1339,1341],{"class":427,"line":449},[425,1333,683],{"class":435},[425,1335,400],{"class":653},[425,1337,1338],{"class":435},">Form submitted!\u003C/",[425,1340,400],{"class":653},[425,1342,660],{"class":435},[425,1344,1345,1347],{"class":427,"line":456},[425,1346,665],{"class":1326},[425,1348,1349],{"class":435},"? } else { ?>\n",[425,1351,1352,1354,1357,1360,1362,1365],{"class":427,"line":472},[425,1353,683],{"class":435},[425,1355,1356],{"class":653},"form",[425,1358,1359],{"class":465}," method",[425,1361,673],{"class":435},[425,1363,1364],{"class":442},"\"POST\"",[425,1366,660],{"class":435},[425,1368,1369,1371,1374,1376,1378,1381,1384,1386],{"class":427,"line":478},[425,1370,693],{"class":435},[425,1372,1373],{"class":653},"button",[425,1375,796],{"class":465},[425,1377,673],{"class":435},[425,1379,1380],{"class":442},"\"submit\"",[425,1382,1383],{"class":435},">Submit\u003C/",[425,1385,1373],{"class":653},[425,1387,660],{"class":435},[425,1389,1390,1392,1394],{"class":427,"line":494},[425,1391,750],{"class":435},[425,1393,1356],{"class":653},[425,1395,660],{"class":435},[425,1397,1398,1400],{"class":427,"line":508},[425,1399,665],{"class":1326},[425,1401,1402],{"class":435},"? } ?>\n",[425,1404,1405],{"class":427,"line":524},[425,1406,453],{"emptyLinePlaceholder":452},[425,1408,1409,1411,1413],{"class":427,"line":530},[425,1410,665],{"class":435},[425,1412,918],{"class":653},[425,1414,660],{"class":435},[425,1416,1417,1419],{"class":427,"line":788},[425,1418,665],{"class":1326},[425,1420,1421],{"class":435},"? for (const item of ['a', 'b', 'c']) { ?>\n",[425,1423,1424,1426,1428,1431,1433],{"class":427,"line":818},[425,1425,683],{"class":435},[425,1427,921],{"class":653},[425,1429,1430],{"class":435},">{{ item }}\u003C/",[425,1432,921],{"class":653},[425,1434,660],{"class":435},[425,1436,1437,1439],{"class":427,"line":827},[425,1438,665],{"class":1326},[425,1440,1402],{"class":435},[425,1442,1444,1446,1448],{"class":427,"line":1443},13,[425,1445,830],{"class":435},[425,1447,918],{"class":653},[425,1449,660],{"class":435},[1241,1451,1453],{"id":1452},"server-scripts","Server scripts",[400,1455,1312,1456,1459],{},[411,1457,1458],{},"\u003Cscript server>"," to execute JavaScript on the server:",[416,1461,1463],{"className":641,"code":1462,"language":643,"meta":5,"style":5},"\u003Cscript server>\n  const data = await fetch('https://api.example.com/data').then(r => r.json());\n\u003C/script>\n\u003Cpre>{{ JSON.stringify(data) }}\u003C/pre>\n",[411,1464,1465,1476,1521,1529],{"__ignoreMap":5},[425,1466,1467,1469,1471,1474],{"class":427,"line":428},[425,1468,665],{"class":435},[425,1470,793],{"class":653},[425,1472,1473],{"class":465}," server",[425,1475,660],{"class":435},[425,1477,1478,1481,1484,1487,1490,1493,1496,1499,1501,1504,1506,1509,1512,1515,1518],{"class":427,"line":449},[425,1479,1480],{"class":431},"  const",[425,1482,1483],{"class":514}," data",[425,1485,1486],{"class":431}," =",[425,1488,1489],{"class":431}," await",[425,1491,1492],{"class":465}," fetch",[425,1494,1495],{"class":435},"(",[425,1497,1498],{"class":442},"'https://api.example.com/data'",[425,1500,615],{"class":435},[425,1502,1503],{"class":465},"then",[425,1505,1495],{"class":435},[425,1507,1508],{"class":873},"r",[425,1510,1511],{"class":431}," =>",[425,1513,1514],{"class":435}," r.",[425,1516,1517],{"class":465},"json",[425,1519,1520],{"class":435},"());\n",[425,1522,1523,1525,1527],{"class":427,"line":456},[425,1524,830],{"class":435},[425,1526,793],{"class":653},[425,1528,660],{"class":435},[425,1530,1531,1533,1535,1538,1540],{"class":427,"line":472},[425,1532,665],{"class":435},[425,1534,416],{"class":653},[425,1536,1537],{"class":435},">{{ JSON.stringify(data) }}\u003C/",[425,1539,416],{"class":653},[425,1541,660],{"class":435},[1241,1543,1545],{"id":1544},"streaming-content","Streaming content",[400,1547,1548,1549,1552],{},"Use the ",[411,1550,1551],{},"echo()"," function for streaming content. It accepts strings, functions, Promises, Response objects, or ReadableStreams:",[416,1554,1556],{"className":641,"code":1555,"language":643,"meta":5,"style":5},"\u003Cscript server>\n  echo(\"Loading...\");\n  echo(async () => fetch(\"https://api.example.com/data\"));\n\u003C/script>\n",[411,1557,1558,1568,1581,1605],{"__ignoreMap":5},[425,1559,1560,1562,1564,1566],{"class":427,"line":428},[425,1561,665],{"class":435},[425,1563,793],{"class":653},[425,1565,1473],{"class":465},[425,1567,660],{"class":435},[425,1569,1570,1573,1575,1578],{"class":427,"line":449},[425,1571,1572],{"class":465},"  echo",[425,1574,1495],{"class":435},[425,1576,1577],{"class":442},"\"Loading...\"",[425,1579,1580],{"class":435},");\n",[425,1582,1583,1585,1587,1590,1593,1595,1597,1599,1602],{"class":427,"line":456},[425,1584,1572],{"class":465},[425,1586,1495],{"class":435},[425,1588,1589],{"class":431},"async",[425,1591,1592],{"class":435}," () ",[425,1594,880],{"class":431},[425,1596,1492],{"class":465},[425,1598,1495],{"class":435},[425,1600,1601],{"class":442},"\"https://api.example.com/data\"",[425,1603,1604],{"class":435},"));\n",[425,1606,1607,1609,1611],{"class":427,"line":472},[425,1608,830],{"class":435},[425,1610,793],{"class":653},[425,1612,660],{"class":435},[1241,1614,1616],{"id":1615},"global-variables","Global variables",[400,1618,1619],{},"Access request context within templates:",[535,1621,1622,1631],{},[538,1623,1624],{},[541,1625,1626,1629],{},[544,1627,1628],{},"Variable",[544,1630,552],{},[554,1632,1633,1647,1664,1677,1687,1697],{},[541,1634,1635,1640],{},[559,1636,1637],{},[411,1638,1639],{},"$REQUEST",[559,1641,1642,1643,1646],{},"The incoming ",[411,1644,1645],{},"Request"," object",[541,1648,1649,1654],{},[559,1650,1651],{},[411,1652,1653],{},"$METHOD",[559,1655,1656,1657,932,1660,1663],{},"HTTP method (",[411,1658,1659],{},"GET",[411,1661,1662],{},"POST",", etc.)",[541,1665,1666,1671],{},[559,1667,1668],{},[411,1669,1670],{},"$URL",[559,1672,1673,1674,1646],{},"Request ",[411,1675,1676],{},"URL",[541,1678,1679,1684],{},[559,1680,1681],{},[411,1682,1683],{},"$HEADERS",[559,1685,1686],{},"Request headers",[541,1688,1689,1694],{},[559,1690,1691],{},[411,1692,1693],{},"$RESPONSE",[559,1695,1696],{},"Response configuration object",[541,1698,1699,1704],{},[559,1700,1701],{},[411,1702,1703],{},"$COOKIES",[559,1705,1706],{},"Read-only object containing request cookies",[1241,1708,1710],{"id":1709},"built-in-functions","Built-in functions",[535,1712,1713,1722],{},[538,1714,1715],{},[541,1716,1717,1720],{},[544,1718,1719],{},"Function",[544,1721,552],{},[554,1723,1724,1738,1748,1758],{},[541,1725,1726,1731],{},[559,1727,1728],{},[411,1729,1730],{},"htmlspecialchars(str)",[559,1732,1733,1734,1737],{},"Escape HTML characters (automatically applied in ",[411,1735,1736],{},"{{ }}"," syntax)",[541,1739,1740,1745],{},[559,1741,1742],{},[411,1743,1744],{},"setCookie(name, value, options?)",[559,1746,1747],{},"Set a cookie in the response",[541,1749,1750,1755],{},[559,1751,1752],{},[411,1753,1754],{},"redirect(url)",[559,1756,1757],{},"Redirect the user to another URL",[541,1759,1760,1765],{},[559,1761,1762],{},[411,1763,1764],{},"echo(content)",[559,1766,1767],{},"Stream content to the response",[416,1769,1771],{"className":641,"code":1770,"filename":614,"language":643,"meta":5,"style":5},"\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n  \u003Chead>\n    \u003Cmeta charset=\"UTF-8\" />\n    \u003Ctitle>Dynamic template\u003C/title>\n  \u003C/head>\n  \u003Cbody>\n    \u003Ch1>Hello {{ $REQUEST.url }}\u003C/h1>\n    \u003Cp>Welcome, \u003C?= $COOKIES[\"user\"] || \"Guest\" ?>!\u003C/p>\n    \u003Cscript server>\n      setCookie(\"visited\", \"true\", { maxAge: 3600 });\n    \u003C/script>\n  \u003C/body>\n\u003C/html>\n",[411,1772,1773,1783,1797,1805,1819,1832,1840,1848,1861,1879,1889,1913,1922,1930],{"__ignoreMap":5},[425,1774,1775,1777,1779,1781],{"class":427,"line":428},[425,1776,650],{"class":435},[425,1778,654],{"class":653},[425,1780,657],{"class":465},[425,1782,660],{"class":435},[425,1784,1785,1787,1789,1791,1793,1795],{"class":427,"line":449},[425,1786,665],{"class":435},[425,1788,643],{"class":653},[425,1790,670],{"class":465},[425,1792,673],{"class":435},[425,1794,676],{"class":442},[425,1796,660],{"class":435},[425,1798,1799,1801,1803],{"class":427,"line":456},[425,1800,683],{"class":435},[425,1802,686],{"class":653},[425,1804,660],{"class":435},[425,1806,1807,1809,1811,1813,1815,1817],{"class":427,"line":472},[425,1808,693],{"class":435},[425,1810,696],{"class":653},[425,1812,699],{"class":465},[425,1814,673],{"class":435},[425,1816,704],{"class":442},[425,1818,707],{"class":435},[425,1820,1821,1823,1825,1828,1830],{"class":427,"line":478},[425,1822,693],{"class":435},[425,1824,738],{"class":653},[425,1826,1827],{"class":435},">Dynamic template\u003C/",[425,1829,738],{"class":653},[425,1831,660],{"class":435},[425,1833,1834,1836,1838],{"class":427,"line":494},[425,1835,750],{"class":435},[425,1837,686],{"class":653},[425,1839,660],{"class":435},[425,1841,1842,1844,1846],{"class":427,"line":508},[425,1843,683],{"class":435},[425,1845,761],{"class":653},[425,1847,660],{"class":435},[425,1849,1850,1852,1854,1857,1859],{"class":427,"line":524},[425,1851,693],{"class":435},[425,1853,1274],{"class":653},[425,1855,1856],{"class":435},">Hello {{ $REQUEST.url }}\u003C/",[425,1858,1274],{"class":653},[425,1860,660],{"class":435},[425,1862,1863,1865,1867,1870,1872,1875,1877],{"class":427,"line":530},[425,1864,693],{"class":435},[425,1866,400],{"class":653},[425,1868,1869],{"class":435},">Welcome, ",[425,1871,665],{"class":1326},[425,1873,1874],{"class":435},"?= $COOKIES[\"user\"] || \"Guest\" ?>!\u003C/",[425,1876,400],{"class":653},[425,1878,660],{"class":435},[425,1880,1881,1883,1885,1887],{"class":427,"line":788},[425,1882,693],{"class":435},[425,1884,793],{"class":653},[425,1886,1473],{"class":465},[425,1888,660],{"class":435},[425,1890,1891,1894,1896,1899,1901,1904,1907,1910],{"class":427,"line":818},[425,1892,1893],{"class":465},"      setCookie",[425,1895,1495],{"class":435},[425,1897,1898],{"class":442},"\"visited\"",[425,1900,932],{"class":435},[425,1902,1903],{"class":442},"\"true\"",[425,1905,1906],{"class":435},", { maxAge: ",[425,1908,1909],{"class":514},"3600",[425,1911,1912],{"class":435}," });\n",[425,1914,1915,1918,1920],{"class":427,"line":827},[425,1916,1917],{"class":435},"    \u003C/",[425,1919,793],{"class":653},[425,1921,660],{"class":435},[425,1923,1924,1926,1928],{"class":427,"line":1443},[425,1925,750],{"class":435},[425,1927,761],{"class":653},[425,1929,660],{"class":435},[425,1931,1933,1935,1937],{"class":427,"line":1932},14,[425,1934,830],{"class":435},[425,1936,643],{"class":653},[425,1938,660],{"class":435},[1940,1941],"read-more",{"title":1942,"to":1236},"Rendu Documentation",[404,1944,1946],{"id":1945},"custom-renderer-handler","Custom renderer handler",[400,1948,1949],{},"For more complex scenarios, you can create a custom renderer handler that programmatically generates responses.",[400,1951,1952,1953,1955,1956,1959],{},"The handler is a default export function that receives an H3 event object. You can access the incoming ",[411,1954,1645],{}," via ",[411,1957,1958],{},"event.req",":",[416,1961,1964],{"className":418,"code":1962,"filename":1963,"language":421,"meta":5,"style":5},"export default function renderer({ req }: { req: Request }) {\n  const url = new URL(req.url);\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    \u003C/body>\n    \u003C/html>`,\n    { headers: { \"content-type\": \"text/html; charset=utf-8\" } }\n  );\n}\n","renderer.ts",[411,1965,1966,2002,2020,2032,2040,2045,2050,2055,2060,2065,2070,2087,2092,2099,2116,2122],{"__ignoreMap":5},[425,1967,1968,1970,1972,1975,1978,1981,1984,1987,1989,1992,1994,1996,1999],{"class":427,"line":428},[425,1969,459],{"class":431},[425,1971,462],{"class":431},[425,1973,1974],{"class":431}," function",[425,1976,1977],{"class":465}," renderer",[425,1979,1980],{"class":435},"({ ",[425,1982,1983],{"class":873},"req",[425,1985,1986],{"class":435}," }",[425,1988,1959],{"class":431},[425,1990,1991],{"class":435}," { ",[425,1993,1983],{"class":873},[425,1995,1959],{"class":431},[425,1997,1998],{"class":465}," Request",[425,2000,2001],{"class":435}," }) {\n",[425,2003,2004,2006,2009,2011,2014,2017],{"class":427,"line":449},[425,2005,1480],{"class":431},[425,2007,2008],{"class":514}," url",[425,2010,1486],{"class":431},[425,2012,2013],{"class":431}," new",[425,2015,2016],{"class":465}," URL",[425,2018,2019],{"class":435},"(req.url);\n",[425,2021,2022,2024,2026,2029],{"class":427,"line":456},[425,2023,888],{"class":431},[425,2025,2013],{"class":431},[425,2027,2028],{"class":465}," Response",[425,2030,2031],{"class":435},"(\n",[425,2033,2034,2037],{"class":427,"line":472},[425,2035,2036],{"class":490},"    /* html */",[425,2038,2039],{"class":442}," `\u003C!DOCTYPE html>\n",[425,2041,2042],{"class":427,"line":478},[425,2043,2044],{"class":442},"    \u003Chtml>\n",[425,2046,2047],{"class":427,"line":494},[425,2048,2049],{"class":442},"    \u003Chead>\n",[425,2051,2052],{"class":427,"line":508},[425,2053,2054],{"class":442},"      \u003Ctitle>Custom Renderer\u003C/title>\n",[425,2056,2057],{"class":427,"line":524},[425,2058,2059],{"class":442},"    \u003C/head>\n",[425,2061,2062],{"class":427,"line":530},[425,2063,2064],{"class":442},"    \u003Cbody>\n",[425,2066,2067],{"class":427,"line":788},[425,2068,2069],{"class":442},"      \u003Ch1>Hello from custom renderer!\u003C/h1>\n",[425,2071,2072,2075,2078,2081,2084],{"class":427,"line":818},[425,2073,2074],{"class":442},"      \u003Cp>Current path: ${",[425,2076,2077],{"class":435},"url",[425,2079,2080],{"class":442},".",[425,2082,2083],{"class":435},"pathname",[425,2085,2086],{"class":442},"}\u003C/p>\n",[425,2088,2089],{"class":427,"line":827},[425,2090,2091],{"class":442},"    \u003C/body>\n",[425,2093,2094,2097],{"class":427,"line":1443},[425,2095,2096],{"class":442},"    \u003C/html>`",[425,2098,1206],{"class":435},[425,2100,2101,2104,2107,2110,2113],{"class":427,"line":1932},[425,2102,2103],{"class":435},"    { headers: { ",[425,2105,2106],{"class":442},"\"content-type\"",[425,2108,2109],{"class":435},": ",[425,2111,2112],{"class":442},"\"text/html; charset=utf-8\"",[425,2114,2115],{"class":435}," } }\n",[425,2117,2119],{"class":427,"line":2118},15,[425,2120,2121],{"class":435},"  );\n",[425,2123,2125],{"class":427,"line":2124},16,[425,2126,2127],{"class":435},"}\n",[400,2129,2130],{},"Then, specify the renderer entry in the Nitro config:",[416,2132,2134],{"className":418,"code":2133,"filename":420,"language":421,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  renderer: {\n    handler: './renderer.ts'\n  }\n})\n",[411,2135,2136,2148,2152,2162,2166,2173,2177],{"__ignoreMap":5},[425,2137,2138,2140,2142,2144,2146],{"class":427,"line":428},[425,2139,432],{"class":431},[425,2141,436],{"class":435},[425,2143,439],{"class":431},[425,2145,443],{"class":442},[425,2147,446],{"class":435},[425,2149,2150],{"class":427,"line":449},[425,2151,453],{"emptyLinePlaceholder":452},[425,2153,2154,2156,2158,2160],{"class":427,"line":456},[425,2155,459],{"class":431},[425,2157,462],{"class":431},[425,2159,466],{"class":465},[425,2161,469],{"class":435},[425,2163,2164],{"class":427,"line":472},[425,2165,475],{"class":435},[425,2167,2168,2170],{"class":427,"line":478},[425,2169,497],{"class":435},[425,2171,2172],{"class":442},"'./renderer.ts'\n",[425,2174,2175],{"class":427,"line":494},[425,2176,527],{"class":435},[425,2178,2179],{"class":427,"line":508},[425,2180,533],{"class":435},[2182,2183,2184],"note",{},[400,2185,600,2186,2189,2190,2192],{},[411,2187,2188],{},"renderer.handler"," is set, it takes full control of rendering. The ",[411,2191,948],{}," option is ignored.",[404,2194,2196],{"id":2195},"renderer-priority","Renderer priority",[400,2198,2199,2200,2203,2204,2207],{},"The renderer always acts as a catch-all route (",[411,2201,2202],{},"/**",") and has the ",[1293,2205,2206],{},"lowest priority",". This means:",[2209,2210,2212,2219,2224],"steps",{"level":2211},"4",[1241,2213,2214,2215,2218],{},"Specific API routes are matched first (e.g., ",[411,2216,2217],{},"/api/users",")",[1241,2220,2221,2222,2218],{},"Specific server routes are matched next (e.g., ",[411,2223,931],{},[1241,2225,2226],{},"The renderer catches everything else",[416,2228,2232],{"className":2229,"code":2230,"language":2231,"meta":5,"style":5},"language-md shiki shiki-themes github-light github-dark github-dark","api/\n  users.ts        → /api/users (matched first)\nroutes/\n  about.ts        → /about (matched second)\nrenderer.ts         → /** (catches all other routes)\n","md",[411,2233,2234,2239,2244,2249,2254],{"__ignoreMap":5},[425,2235,2236],{"class":427,"line":428},[425,2237,2238],{"class":435},"api/\n",[425,2240,2241],{"class":427,"line":449},[425,2242,2243],{"class":435},"  users.ts        → /api/users (matched first)\n",[425,2245,2246],{"class":427,"line":456},[425,2247,2248],{"class":435},"routes/\n",[425,2250,2251],{"class":427,"line":472},[425,2252,2253],{"class":435},"  about.ts        → /about (matched second)\n",[425,2255,2256],{"class":427,"line":478},[425,2257,2258],{"class":435},"renderer.ts         → /** (catches all other routes)\n",[2260,2261,2262],"warning",{},[400,2263,2264,2265,2268],{},"If you define a catch-all route (",[411,2266,2267],{},"[...].ts",") in your routes, Nitro will warn you that the renderer will override it. Use more specific routes or different HTTP methods to avoid conflicts.",[1940,2270],{"title":43,"to":44},[404,2272,2274],{"id":2273},"vite-integration","Vite integration",[400,2276,2277],{},"When using Nitro with Vite, the renderer integrates with Vite's build pipeline and dev server.",[621,2279,2281],{"id":2280},"development-mode","Development mode",[400,2283,2284,2285,2287,2288,2291],{},"In development, the renderer template is read from disk on each request, so changes to ",[411,2286,614],{}," are reflected immediately without restarting the server. Vite's ",[411,2289,2290],{},"transformIndexHtml"," hook is applied to inject HMR client scripts and other dev-time transforms.",[621,2293,2295,2296],{"id":2294},"ssr-with-ssr-outlet","SSR with ",[411,2297,2298],{},"\u003C!--ssr-outlet-->",[400,2300,2301,2302,2305,2306,2308,2309,2311],{},"When using Vite environments with an ",[411,2303,2304],{},"ssr"," service, you can add an ",[411,2307,2298],{}," comment to your ",[411,2310,614],{},". Nitro will replace it with the output from your SSR entry during rendering:",[416,2313,2315],{"className":641,"code":2314,"filename":614,"language":643,"meta":5,"style":5},"\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n  \u003Chead>\n    \u003Cmeta charset=\"UTF-8\" />\n    \u003Ctitle>SSR App\u003C/title>\n  \u003C/head>\n  \u003Cbody>\n    \u003Cdiv id=\"app\">\u003C!--ssr-outlet-->\u003C/div>\n    \u003Cscript type=\"module\" src=\"/src/main.ts\">\u003C/script>\n  \u003C/body>\n\u003C/html>\n",[411,2316,2317,2327,2341,2349,2363,2376,2384,2392,2415,2439,2447],{"__ignoreMap":5},[425,2318,2319,2321,2323,2325],{"class":427,"line":428},[425,2320,650],{"class":435},[425,2322,654],{"class":653},[425,2324,657],{"class":465},[425,2326,660],{"class":435},[425,2328,2329,2331,2333,2335,2337,2339],{"class":427,"line":449},[425,2330,665],{"class":435},[425,2332,643],{"class":653},[425,2334,670],{"class":465},[425,2336,673],{"class":435},[425,2338,676],{"class":442},[425,2340,660],{"class":435},[425,2342,2343,2345,2347],{"class":427,"line":456},[425,2344,683],{"class":435},[425,2346,686],{"class":653},[425,2348,660],{"class":435},[425,2350,2351,2353,2355,2357,2359,2361],{"class":427,"line":472},[425,2352,693],{"class":435},[425,2354,696],{"class":653},[425,2356,699],{"class":465},[425,2358,673],{"class":435},[425,2360,704],{"class":442},[425,2362,707],{"class":435},[425,2364,2365,2367,2369,2372,2374],{"class":427,"line":478},[425,2366,693],{"class":435},[425,2368,738],{"class":653},[425,2370,2371],{"class":435},">SSR App\u003C/",[425,2373,738],{"class":653},[425,2375,660],{"class":435},[425,2377,2378,2380,2382],{"class":427,"line":494},[425,2379,750],{"class":435},[425,2381,686],{"class":653},[425,2383,660],{"class":435},[425,2385,2386,2388,2390],{"class":427,"line":508},[425,2387,683],{"class":435},[425,2389,761],{"class":653},[425,2391,660],{"class":435},[425,2393,2394,2396,2398,2400,2402,2404,2407,2409,2411,2413],{"class":427,"line":524},[425,2395,693],{"class":435},[425,2397,770],{"class":653},[425,2399,773],{"class":465},[425,2401,673],{"class":435},[425,2403,778],{"class":442},[425,2405,2406],{"class":435},">",[425,2408,2298],{"class":490},[425,2410,830],{"class":435},[425,2412,770],{"class":653},[425,2414,660],{"class":435},[425,2416,2417,2419,2421,2423,2425,2427,2429,2431,2433,2435,2437],{"class":427,"line":530},[425,2418,693],{"class":435},[425,2420,793],{"class":653},[425,2422,796],{"class":465},[425,2424,673],{"class":435},[425,2426,801],{"class":442},[425,2428,804],{"class":465},[425,2430,673],{"class":435},[425,2432,809],{"class":442},[425,2434,781],{"class":435},[425,2436,793],{"class":653},[425,2438,660],{"class":435},[425,2440,2441,2443,2445],{"class":427,"line":788},[425,2442,750],{"class":435},[425,2444,761],{"class":653},[425,2446,660],{"class":435},[425,2448,2449,2451,2453],{"class":427,"line":818},[425,2450,830],{"class":435},[425,2452,643],{"class":653},[425,2454,660],{"class":435},[621,2456,2458],{"id":2457},"production-build","Production build",[400,2460,2461,2462,2464],{},"During production builds, Vite processes the ",[411,2463,614],{}," through its build pipeline (resolving scripts, CSS, and other assets), then Nitro inlines the transformed HTML into the server bundle.",[404,2466,2468],{"id":2467},"use-cases","Use Cases",[621,2470,2472],{"id":2471},"single-page-application-spa","Single-Page Application (SPA)",[400,2474,2475,2476,2478],{},"Serve your SPA's ",[411,2477,614],{}," for all routes to enable client-side routing:",[904,2480,2481],{},[400,2482,2483],{},"\nThis is the default behavior of Nitro when used with Vite.",[2485,2486,2487],"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 pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}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 .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}html pre.shiki code .sByVh, html code.shiki .sByVh{--shiki-light:#22863A;--shiki-default:#85E89D;--shiki-dark:#85E89D}html pre.shiki code .sVAnh, html code.shiki .sVAnh{--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-default:#FDAEB7;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":5,"searchDepth":449,"depth":449,"links":2489},[2490,2491,2498,2499,2500,2506],{"id":406,"depth":449,"text":33},{"id":618,"depth":449,"text":619,"children":2492},[2493,2495,2496,2497],{"id":623,"depth":456,"text":2494},"Auto-detected index.html",{"id":941,"depth":456,"text":942},{"id":1146,"depth":456,"text":1147},{"id":1229,"depth":456,"text":1230},{"id":1945,"depth":449,"text":1946},{"id":2195,"depth":449,"text":2196},{"id":2273,"depth":449,"text":2274,"children":2501},[2502,2503,2505],{"id":2280,"depth":456,"text":2281},{"id":2294,"depth":456,"text":2504},"SSR with \u003C!--ssr-outlet-->",{"id":2457,"depth":456,"text":2458},{"id":2467,"depth":449,"text":2468,"children":2507},[2508],{"id":2471,"depth":456,"text":2472},"Use a renderer to handle all unmatched routes with custom HTML or a templating system.",{"icon":21},{"title":18,"icon":21},{"title":395,"description":2509},"9CnfJzzu3bGZNPlHQcaLZyScF3UtDcaQpY_DGeAYFBY",[2515,2517],{"title":13,"path":14,"stem":15,"description":2516,"icon":16,"children":-1},"Start with a fresh Nitro project or adopt it in your current Vite project.",{"title":23,"path":24,"stem":25,"description":2518,"icon":26,"children":-1},"Nitro supports filesystem routing to automatically map files to routes. By combining code-splitting with compiled routes, it removes the need for a runtime router, leaving only minimal compiled logic.",1775753651788]