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