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