[{"data":1,"prerenderedAt":4539},["ShallowReactive",2],{"navigation":3,"-docs-routing":394,"-docs-routing-surround":4535},[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":23,"body":396,"description":4530,"extension":2114,"meta":4531,"navigation":4532,"path":24,"seo":4533,"stem":25,"__hash__":4534},"content/1.docs/5.routing.md",{"type":397,"value":398,"toc":4490,"icon":26},"minimark",[399,404,421,577,581,598,606,614,617,666,671,682,685,727,733,738,747,750,804,808,812,835,918,925,935,939,951,1037,1041,1051,1124,1129,1138,1142,1153,1183,1379,1383,1386,1392,1453,1457,1476,1479,1503,1516,1520,1527,1610,1614,1620,1626,1632,1757,1760,1876,1882,1887,1968,1971,2094,2096,2099,2104,2110,2146,2150,2153,2217,2228,2236,2240,2247,2253,2370,2377,2381,2384,2408,2411,2435,2468,2472,2475,2478,2481,2566,2570,2584,2658,2668,2672,2680,2691,2700,2704,2714,2724,2728,2731,2740,2755,2766,2773,2981,2985,2988,2995,3093,3097,3100,3176,3180,3200,3205,3280,3284,3291,3390,3394,3397,3533,3537,3540,3649,3653,3666,3806,3823,3827,3830,3896,3900,3903,4018,4022,4181,4185,4192,4271,4275,4278,4486],[400,401,403],"h2",{"id":402},"request-handler","Request handler",[405,406,407,408,412,413,420],"p",{},"Nitro request handler is a function accepting an ",[409,410,411],"code",{},"event"," object, which is a ",[414,415,419],"a",{"href":416,"rel":417},"https://h3.dev/guide/api/h3event#h3event-properties",[418],"nofollow","H3Event"," object.",[422,423,424,514],"code-group",{},[425,426,431],"pre",{"className":427,"code":428,"filename":429,"language":430,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import type { H3Event } from \"nitro\";\n\nexport default (event: H3Event) => {\n  return \"world\";\n}\n","Single function","ts",[409,432,433,459,466,497,508],{"__ignoreMap":5},[434,435,438,442,445,449,452,456],"span",{"class":436,"line":437},"line",1,[434,439,441],{"class":440},"so5gQ","import",[434,443,444],{"class":440}," type",[434,446,448],{"class":447},"slsVL"," { H3Event } ",[434,450,451],{"class":440},"from",[434,453,455],{"class":454},"sfrk1"," \"nitro\"",[434,457,458],{"class":447},";\n",[434,460,462],{"class":436,"line":461},2,[434,463,465],{"emptyLinePlaceholder":464},true,"\n",[434,467,469,472,475,478,481,484,488,491,494],{"class":436,"line":468},3,[434,470,471],{"class":440},"export",[434,473,474],{"class":440}," default",[434,476,477],{"class":447}," (",[434,479,411],{"class":480},"sQHwn",[434,482,483],{"class":440},":",[434,485,487],{"class":486},"shcOC"," H3Event",[434,489,490],{"class":447},") ",[434,492,493],{"class":440},"=>",[434,495,496],{"class":447}," {\n",[434,498,500,503,506],{"class":436,"line":499},4,[434,501,502],{"class":440},"  return",[434,504,505],{"class":454}," \"world\"",[434,507,458],{"class":447},[434,509,511],{"class":436,"line":510},5,[434,512,513],{"class":447},"}\n",[425,515,518],{"className":427,"code":516,"filename":517,"language":430,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\n// For better type inference\nexport default defineHandler((event) => {\n  return \"world\";\n});\n","defineHandler",[409,519,520,533,537,543,563,571],{"__ignoreMap":5},[434,521,522,524,527,529,531],{"class":436,"line":437},[434,523,441],{"class":440},[434,525,526],{"class":447}," { defineHandler } ",[434,528,451],{"class":440},[434,530,455],{"class":454},[434,532,458],{"class":447},[434,534,535],{"class":436,"line":461},[434,536,465],{"emptyLinePlaceholder":464},[434,538,539],{"class":436,"line":468},[434,540,542],{"class":541},"sCsY4","// For better type inference\n",[434,544,545,547,549,552,555,557,559,561],{"class":436,"line":499},[434,546,471],{"class":440},[434,548,474],{"class":440},[434,550,551],{"class":486}," defineHandler",[434,553,554],{"class":447},"((",[434,556,411],{"class":480},[434,558,490],{"class":447},[434,560,493],{"class":440},[434,562,496],{"class":447},[434,564,565,567,569],{"class":436,"line":510},[434,566,502],{"class":440},[434,568,505],{"class":454},[434,570,458],{"class":447},[434,572,574],{"class":436,"line":573},6,[434,575,576],{"class":447},"});\n",[400,578,580],{"id":579},"filesystem-routing","Filesystem routing",[405,582,583,584,589,590,593,594,597],{},"Nitro supports file-based routing for your API routes (files are automatically mapped to ",[414,585,588],{"href":586,"rel":587},"https://h3.dev/guide/basics/routing",[418],"h3 routes","). Defining a route is as simple as creating a file inside the ",[409,591,592],{},"api/"," or ",[409,595,596],{},"routes/"," directory.",[405,599,600,601,605],{},"You can only define one handler per files and you can ",[414,602,604],{"href":603},"#specific-request-method","append the HTTP method"," to the filename to define a specific request method.",[425,607,612],{"className":608,"code":610,"language":611},[609],"language-text","routes/\n  api/\n    test.ts      \u003C-- /api/test\n  hello.get.ts   \u003C-- /hello (GET only)\n  hello.post.ts  \u003C-- /hello (POST only)\nvite.config.ts\n","text",[409,613,610],{"__ignoreMap":5},[405,615,616],{},"You can nest routes by creating subdirectories.",[425,618,622],{"className":619,"code":620,"language":621,"meta":5,"style":5},"language-txt shiki shiki-themes github-light github-dark github-dark","routes/\n  api/\n    [org]/\n      [repo]/\n        index.ts   \u003C-- /api/:org/:repo\n        issues.ts  \u003C-- /api/:org/:repo/issues\n      index.ts     \u003C-- /api/:org\npackage.json\n","txt",[409,623,624,629,634,639,644,649,654,660],{"__ignoreMap":5},[434,625,626],{"class":436,"line":437},[434,627,628],{},"routes/\n",[434,630,631],{"class":436,"line":461},[434,632,633],{},"  api/\n",[434,635,636],{"class":436,"line":468},[434,637,638],{},"    [org]/\n",[434,640,641],{"class":436,"line":499},[434,642,643],{},"      [repo]/\n",[434,645,646],{"class":436,"line":510},[434,647,648],{},"        index.ts   \u003C-- /api/:org/:repo\n",[434,650,651],{"class":436,"line":573},[434,652,653],{},"        issues.ts  \u003C-- /api/:org/:repo/issues\n",[434,655,657],{"class":436,"line":656},7,[434,658,659],{},"      index.ts     \u003C-- /api/:org\n",[434,661,663],{"class":436,"line":662},8,[434,664,665],{},"package.json\n",[667,668,670],"h4",{"id":669},"route-groups","Route Groups",[405,672,673,674,677,678,681],{},"In some cases, you may want to group a set of routes together in a way which doesn't affect file-based routing. For this purpose, you can put files in a folder which is wrapped in parentheses ",[409,675,676],{},"("," and ",[409,679,680],{},")",".",[405,683,684],{},"For example:",[425,686,688],{"className":619,"code":687,"language":621,"meta":5,"style":5},"routes/\n  api/\n    (admin)/\n      users.ts   \u003C-- /api/users\n      reports.ts \u003C-- /api/reports\n    (public)/\n      index.ts   \u003C-- /api\npackage.json\n",[409,689,690,694,698,703,708,713,718,723],{"__ignoreMap":5},[434,691,692],{"class":436,"line":437},[434,693,628],{},[434,695,696],{"class":436,"line":461},[434,697,633],{},[434,699,700],{"class":436,"line":468},[434,701,702],{},"    (admin)/\n",[434,704,705],{"class":436,"line":499},[434,706,707],{},"      users.ts   \u003C-- /api/users\n",[434,709,710],{"class":436,"line":510},[434,711,712],{},"      reports.ts \u003C-- /api/reports\n",[434,714,715],{"class":436,"line":573},[434,716,717],{},"    (public)/\n",[434,719,720],{"class":436,"line":656},[434,721,722],{},"      index.ts   \u003C-- /api\n",[434,724,725],{"class":436,"line":662},[434,726,665],{},[728,729,730],"note",{},[405,731,732],{}," The route groups are not part of the route definition and are only used for organization purposes.",[734,735,737],"h3",{"id":736},"static-routes","Static routes",[405,739,740,741,593,743,746],{},"First, create a file in ",[409,742,596],{},[409,744,745],{},"routes/api/"," directory. The filename will be the route path.",[405,748,749],{},"Then, export a fetch-compatible function:",[425,751,754],{"className":427,"code":752,"filename":753,"language":430,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler(() => {\n  return { hello: \"API\" };\n});\n","routes/api/test.ts",[409,755,756,768,772,787,800],{"__ignoreMap":5},[434,757,758,760,762,764,766],{"class":436,"line":437},[434,759,441],{"class":440},[434,761,526],{"class":447},[434,763,451],{"class":440},[434,765,455],{"class":454},[434,767,458],{"class":447},[434,769,770],{"class":436,"line":461},[434,771,465],{"emptyLinePlaceholder":464},[434,773,774,776,778,780,783,785],{"class":436,"line":468},[434,775,471],{"class":440},[434,777,474],{"class":440},[434,779,551],{"class":486},[434,781,782],{"class":447},"(() ",[434,784,493],{"class":440},[434,786,496],{"class":447},[434,788,789,791,794,797],{"class":436,"line":499},[434,790,502],{"class":440},[434,792,793],{"class":447}," { hello: ",[434,795,796],{"class":454},"\"API\"",[434,798,799],{"class":447}," };\n",[434,801,802],{"class":436,"line":510},[434,803,576],{"class":447},[734,805,807],{"id":806},"dynamic-routes","Dynamic routes",[667,809,811],{"id":810},"single-param","Single param",[405,813,814,815,818,819,822,823,826,827,834],{},"To define a route with params, use the ",[409,816,817],{},"[\u003Cparam>]"," syntax where ",[409,820,821],{},"\u003Cparam>"," is the name of the param. The param will be available in the ",[409,824,825],{},"event.context.params"," object or using the ",[414,828,831],{"href":829,"rel":830},"https://h3.dev/utils/request#getrouterparamevent-name-opts-decode",[418],[409,832,833],{},"getRouterParam"," utility.",[425,836,839],{"className":427,"code":837,"filename":838,"language":430,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler((event) => {\n  const { name } = event.context.params;\n\n  return `Hello ${name}!`;\n});\n","routes/hello/[name].ts",[409,840,841,853,857,875,896,900,914],{"__ignoreMap":5},[434,842,843,845,847,849,851],{"class":436,"line":437},[434,844,441],{"class":440},[434,846,526],{"class":447},[434,848,451],{"class":440},[434,850,455],{"class":454},[434,852,458],{"class":447},[434,854,855],{"class":436,"line":461},[434,856,465],{"emptyLinePlaceholder":464},[434,858,859,861,863,865,867,869,871,873],{"class":436,"line":468},[434,860,471],{"class":440},[434,862,474],{"class":440},[434,864,551],{"class":486},[434,866,554],{"class":447},[434,868,411],{"class":480},[434,870,490],{"class":447},[434,872,493],{"class":440},[434,874,496],{"class":447},[434,876,877,880,883,887,890,893],{"class":436,"line":499},[434,878,879],{"class":440},"  const",[434,881,882],{"class":447}," { ",[434,884,886],{"class":885},"suiK_","name",[434,888,889],{"class":447}," } ",[434,891,892],{"class":440},"=",[434,894,895],{"class":447}," event.context.params;\n",[434,897,898],{"class":436,"line":510},[434,899,465],{"emptyLinePlaceholder":464},[434,901,902,904,907,909,912],{"class":436,"line":573},[434,903,502],{"class":440},[434,905,906],{"class":454}," `Hello ${",[434,908,886],{"class":447},[434,910,911],{"class":454},"}!`",[434,913,458],{"class":447},[434,915,916],{"class":436,"line":656},[434,917,576],{"class":447},[405,919,920,921,924],{},"Call the route with the param ",[409,922,923],{},"/hello/nitro",", you will get:",[425,926,929],{"className":619,"code":927,"filename":928,"language":621,"meta":5,"style":5},"Hello nitro!\n","Response",[409,930,931],{"__ignoreMap":5},[434,932,933],{"class":436,"line":437},[434,934,927],{},[667,936,938],{"id":937},"multiple-params","Multiple params",[405,940,941,942,945,946,950],{},"You can define multiple params in a route using ",[409,943,944],{},"[\u003Cparam1>]/[\u003Cparam2>]"," syntax where each param is a folder. You ",[947,948,949],"strong",{},"cannot"," define multiple params in a single filename of folder.",[425,952,955],{"className":427,"code":953,"filename":954,"language":430,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler((event) => {\n  const { name, age } = event.context.params;\n\n  return `Hello ${name}! You are ${age} years old.`;\n});\n","routes/hello/[name]/[age].ts",[409,956,957,969,973,991,1011,1015,1033],{"__ignoreMap":5},[434,958,959,961,963,965,967],{"class":436,"line":437},[434,960,441],{"class":440},[434,962,526],{"class":447},[434,964,451],{"class":440},[434,966,455],{"class":454},[434,968,458],{"class":447},[434,970,971],{"class":436,"line":461},[434,972,465],{"emptyLinePlaceholder":464},[434,974,975,977,979,981,983,985,987,989],{"class":436,"line":468},[434,976,471],{"class":440},[434,978,474],{"class":440},[434,980,551],{"class":486},[434,982,554],{"class":447},[434,984,411],{"class":480},[434,986,490],{"class":447},[434,988,493],{"class":440},[434,990,496],{"class":447},[434,992,993,995,997,999,1002,1005,1007,1009],{"class":436,"line":499},[434,994,879],{"class":440},[434,996,882],{"class":447},[434,998,886],{"class":885},[434,1000,1001],{"class":447},", ",[434,1003,1004],{"class":885},"age",[434,1006,889],{"class":447},[434,1008,892],{"class":440},[434,1010,895],{"class":447},[434,1012,1013],{"class":436,"line":510},[434,1014,465],{"emptyLinePlaceholder":464},[434,1016,1017,1019,1021,1023,1026,1028,1031],{"class":436,"line":573},[434,1018,502],{"class":440},[434,1020,906],{"class":454},[434,1022,886],{"class":447},[434,1024,1025],{"class":454},"}! You are ${",[434,1027,1004],{"class":447},[434,1029,1030],{"class":454},"} years old.`",[434,1032,458],{"class":447},[434,1034,1035],{"class":436,"line":656},[434,1036,576],{"class":447},[667,1038,1040],{"id":1039},"catch-all-params","Catch-all params",[405,1042,1043,1044,1047,1048,1050],{},"You can capture all the remaining parts of a URL using ",[409,1045,1046],{},"[...\u003Cparam>]"," syntax. This will include the ",[409,1049,392],{}," in the param.",[425,1052,1054],{"className":427,"code":837,"filename":1053,"language":430,"meta":5,"style":5},"routes/hello/[...name].ts",[409,1055,1056,1068,1072,1090,1104,1108,1120],{"__ignoreMap":5},[434,1057,1058,1060,1062,1064,1066],{"class":436,"line":437},[434,1059,441],{"class":440},[434,1061,526],{"class":447},[434,1063,451],{"class":440},[434,1065,455],{"class":454},[434,1067,458],{"class":447},[434,1069,1070],{"class":436,"line":461},[434,1071,465],{"emptyLinePlaceholder":464},[434,1073,1074,1076,1078,1080,1082,1084,1086,1088],{"class":436,"line":468},[434,1075,471],{"class":440},[434,1077,474],{"class":440},[434,1079,551],{"class":486},[434,1081,554],{"class":447},[434,1083,411],{"class":480},[434,1085,490],{"class":447},[434,1087,493],{"class":440},[434,1089,496],{"class":447},[434,1091,1092,1094,1096,1098,1100,1102],{"class":436,"line":499},[434,1093,879],{"class":440},[434,1095,882],{"class":447},[434,1097,886],{"class":885},[434,1099,889],{"class":447},[434,1101,892],{"class":440},[434,1103,895],{"class":447},[434,1105,1106],{"class":436,"line":510},[434,1107,465],{"emptyLinePlaceholder":464},[434,1109,1110,1112,1114,1116,1118],{"class":436,"line":573},[434,1111,502],{"class":440},[434,1113,906],{"class":454},[434,1115,886],{"class":447},[434,1117,911],{"class":454},[434,1119,458],{"class":447},[434,1121,1122],{"class":436,"line":656},[434,1123,576],{"class":447},[405,1125,920,1126,924],{},[409,1127,1128],{},"/hello/nitro/is/hot",[425,1130,1132],{"className":619,"code":1131,"filename":928,"language":621,"meta":5,"style":5},"Hello nitro/is/hot!\n",[409,1133,1134],{"__ignoreMap":5},[434,1135,1136],{"class":436,"line":437},[434,1137,1131],{},[734,1139,1141],{"id":1140},"specific-request-method","Specific request method",[405,1143,1144,1145,1148,1149,1152],{},"You can append the HTTP method to the filename to force the route to be matched only for a specific HTTP request method, for example ",[409,1146,1147],{},"hello.get.ts"," will only match for ",[409,1150,1151],{},"GET"," requests. You can use any HTTP method you want.",[405,1154,1155,1156,1001,1159,1001,1162,1001,1165,1001,1168,1001,1171,1001,1174,1001,1177,1001,1180,681],{},"Supported methods: ",[409,1157,1158],{},"get",[409,1160,1161],{},"post",[409,1163,1164],{},"put",[409,1166,1167],{},"delete",[409,1169,1170],{},"patch",[409,1172,1173],{},"head",[409,1175,1176],{},"options",[409,1178,1179],{},"connect",[409,1181,1182],{},"trace",[422,1184,1185,1279],{},[425,1186,1190],{"className":1187,"code":1188,"filename":1151,"language":1189,"meta":5,"style":5},"language-js shiki shiki-themes github-light github-dark github-dark","// routes/users/[id].get.ts\nimport { defineHandler } from \"nitro\";\n\nexport default defineHandler(async (event) => {\n  const { id } = event.context.params;\n\n  // Do something with id\n\n  return `User profile!`;\n});\n","js",[409,1191,1192,1197,1209,1213,1236,1251,1255,1260,1264,1274],{"__ignoreMap":5},[434,1193,1194],{"class":436,"line":437},[434,1195,1196],{"class":541},"// routes/users/[id].get.ts\n",[434,1198,1199,1201,1203,1205,1207],{"class":436,"line":461},[434,1200,441],{"class":440},[434,1202,526],{"class":447},[434,1204,451],{"class":440},[434,1206,455],{"class":454},[434,1208,458],{"class":447},[434,1210,1211],{"class":436,"line":468},[434,1212,465],{"emptyLinePlaceholder":464},[434,1214,1215,1217,1219,1221,1223,1226,1228,1230,1232,1234],{"class":436,"line":499},[434,1216,471],{"class":440},[434,1218,474],{"class":440},[434,1220,551],{"class":486},[434,1222,676],{"class":447},[434,1224,1225],{"class":440},"async",[434,1227,477],{"class":447},[434,1229,411],{"class":480},[434,1231,490],{"class":447},[434,1233,493],{"class":440},[434,1235,496],{"class":447},[434,1237,1238,1240,1242,1245,1247,1249],{"class":436,"line":510},[434,1239,879],{"class":440},[434,1241,882],{"class":447},[434,1243,1244],{"class":885},"id",[434,1246,889],{"class":447},[434,1248,892],{"class":440},[434,1250,895],{"class":447},[434,1252,1253],{"class":436,"line":573},[434,1254,465],{"emptyLinePlaceholder":464},[434,1256,1257],{"class":436,"line":656},[434,1258,1259],{"class":541},"  // Do something with id\n",[434,1261,1262],{"class":436,"line":662},[434,1263,465],{"emptyLinePlaceholder":464},[434,1265,1267,1269,1272],{"class":436,"line":1266},9,[434,1268,502],{"class":440},[434,1270,1271],{"class":454}," `User profile!`",[434,1273,458],{"class":447},[434,1275,1277],{"class":436,"line":1276},10,[434,1278,576],{"class":447},[425,1280,1283],{"className":1187,"code":1281,"filename":1282,"language":1189,"meta":5,"style":5},"// routes/users.post.ts\nimport { defineHandler } from \"nitro\";\n\nexport default defineHandler(async (event) => {\n  const body = await event.req.json();\n\n  // Do something with body like saving it to a database\n\n  return { updated: true };\n});\n","POST",[409,1284,1285,1290,1302,1306,1328,1350,1354,1359,1363,1375],{"__ignoreMap":5},[434,1286,1287],{"class":436,"line":437},[434,1288,1289],{"class":541},"// routes/users.post.ts\n",[434,1291,1292,1294,1296,1298,1300],{"class":436,"line":461},[434,1293,441],{"class":440},[434,1295,526],{"class":447},[434,1297,451],{"class":440},[434,1299,455],{"class":454},[434,1301,458],{"class":447},[434,1303,1304],{"class":436,"line":468},[434,1305,465],{"emptyLinePlaceholder":464},[434,1307,1308,1310,1312,1314,1316,1318,1320,1322,1324,1326],{"class":436,"line":499},[434,1309,471],{"class":440},[434,1311,474],{"class":440},[434,1313,551],{"class":486},[434,1315,676],{"class":447},[434,1317,1225],{"class":440},[434,1319,477],{"class":447},[434,1321,411],{"class":480},[434,1323,490],{"class":447},[434,1325,493],{"class":440},[434,1327,496],{"class":447},[434,1329,1330,1332,1335,1338,1341,1344,1347],{"class":436,"line":510},[434,1331,879],{"class":440},[434,1333,1334],{"class":885}," body",[434,1336,1337],{"class":440}," =",[434,1339,1340],{"class":440}," await",[434,1342,1343],{"class":447}," event.req.",[434,1345,1346],{"class":486},"json",[434,1348,1349],{"class":447},"();\n",[434,1351,1352],{"class":436,"line":573},[434,1353,465],{"emptyLinePlaceholder":464},[434,1355,1356],{"class":436,"line":656},[434,1357,1358],{"class":541},"  // Do something with body like saving it to a database\n",[434,1360,1361],{"class":436,"line":662},[434,1362,465],{"emptyLinePlaceholder":464},[434,1364,1365,1367,1370,1373],{"class":436,"line":1266},[434,1366,502],{"class":440},[434,1368,1369],{"class":447}," { updated: ",[434,1371,1372],{"class":885},"true",[434,1374,799],{"class":447},[434,1376,1377],{"class":436,"line":1276},[434,1378,576],{"class":447},[734,1380,1382],{"id":1381},"catch-all-route","Catch-all route",[405,1384,1385],{},"You can create a special route that will match all routes that are not matched by any other route. This is useful for creating a default route.",[405,1387,1388,1389,681],{},"To create a catch-all route, create a file named ",[409,1390,1391],{},"[...].ts",[425,1393,1396],{"className":427,"code":1394,"filename":1395,"language":430,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler((event) => {\n  return `Hello ${event.url}!`;\n});\n","routes/[...].ts",[409,1397,1398,1410,1414,1432,1449],{"__ignoreMap":5},[434,1399,1400,1402,1404,1406,1408],{"class":436,"line":437},[434,1401,441],{"class":440},[434,1403,526],{"class":447},[434,1405,451],{"class":440},[434,1407,455],{"class":454},[434,1409,458],{"class":447},[434,1411,1412],{"class":436,"line":461},[434,1413,465],{"emptyLinePlaceholder":464},[434,1415,1416,1418,1420,1422,1424,1426,1428,1430],{"class":436,"line":468},[434,1417,471],{"class":440},[434,1419,474],{"class":440},[434,1421,551],{"class":486},[434,1423,554],{"class":447},[434,1425,411],{"class":480},[434,1427,490],{"class":447},[434,1429,493],{"class":440},[434,1431,496],{"class":447},[434,1433,1434,1436,1438,1440,1442,1445,1447],{"class":436,"line":499},[434,1435,502],{"class":440},[434,1437,906],{"class":454},[434,1439,411],{"class":447},[434,1441,681],{"class":454},[434,1443,1444],{"class":447},"url",[434,1446,911],{"class":454},[434,1448,458],{"class":447},[434,1450,1451],{"class":436,"line":510},[434,1452,576],{"class":447},[734,1454,1456],{"id":1455},"environment-specific-handlers","Environment specific handlers",[405,1458,1459,1460,1001,1463,593,1466,1469,1470,593,1473,681],{},"You can specify for a route that will only be included in specific builds by adding a ",[409,1461,1462],{},".dev",[409,1464,1465],{},".prod",[409,1467,1468],{},".prerender"," suffix to the file name, for example: ",[409,1471,1472],{},"routes/test.get.dev.ts",[409,1474,1475],{},"routes/test.get.prod.ts",[405,1477,1478],{},"The suffix is placed after the method suffix (if any):",[425,1480,1482],{"className":619,"code":1481,"language":621,"meta":5,"style":5},"routes/\n  env/\n    index.dev.ts       \u003C-- /env (dev only)\n    index.get.prod.ts  \u003C-- /env (GET, prod only)\n",[409,1483,1484,1488,1493,1498],{"__ignoreMap":5},[434,1485,1486],{"class":436,"line":437},[434,1487,628],{},[434,1489,1490],{"class":436,"line":461},[434,1491,1492],{},"  env/\n",[434,1494,1495],{"class":436,"line":468},[434,1496,1497],{},"    index.dev.ts       \u003C-- /env (dev only)\n",[434,1499,1500],{"class":436,"line":499},[434,1501,1502],{},"    index.get.prod.ts  \u003C-- /env (GET, prod only)\n",[1504,1505,1506],"tip",{},[405,1507,1508,1509,1515],{},"\nYou can specify multiple environments or specify a preset name as environment using programmatic registration of routes via ",[414,1510,1512],{"href":1511},"#routes-config",[409,1513,1514],{},"routes"," config.",[734,1517,1519],{"id":1518},"ignoring-files","Ignoring files",[405,1521,1522,1523,1526],{},"You can use the ",[409,1524,1525],{},"ignore"," config option to exclude files from route scanning. It accepts an array of glob patterns relative to the server directory.",[425,1528,1531],{"className":427,"code":1529,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  ignore: [\n    \"routes/api/**/_*\",   // Ignore files starting with _ in api/\n    \"middleware/_*.ts\",    // Ignore middleware starting with _\n    \"routes/_*.ts\",       // Ignore root routes starting with _\n  ],\n});\n","nitro.config.ts",[409,1532,1533,1547,1551,1563,1568,1579,1590,1601,1606],{"__ignoreMap":5},[434,1534,1535,1537,1540,1542,1545],{"class":436,"line":437},[434,1536,441],{"class":440},[434,1538,1539],{"class":447}," { defineNitroConfig } ",[434,1541,451],{"class":440},[434,1543,1544],{"class":454}," \"nitro/config\"",[434,1546,458],{"class":447},[434,1548,1549],{"class":436,"line":461},[434,1550,465],{"emptyLinePlaceholder":464},[434,1552,1553,1555,1557,1560],{"class":436,"line":468},[434,1554,471],{"class":440},[434,1556,474],{"class":440},[434,1558,1559],{"class":486}," defineNitroConfig",[434,1561,1562],{"class":447},"({\n",[434,1564,1565],{"class":436,"line":499},[434,1566,1567],{"class":447},"  ignore: [\n",[434,1569,1570,1573,1576],{"class":436,"line":510},[434,1571,1572],{"class":454},"    \"routes/api/**/_*\"",[434,1574,1575],{"class":447},",   ",[434,1577,1578],{"class":541},"// Ignore files starting with _ in api/\n",[434,1580,1581,1584,1587],{"class":436,"line":573},[434,1582,1583],{"class":454},"    \"middleware/_*.ts\"",[434,1585,1586],{"class":447},",    ",[434,1588,1589],{"class":541},"// Ignore middleware starting with _\n",[434,1591,1592,1595,1598],{"class":436,"line":656},[434,1593,1594],{"class":454},"    \"routes/_*.ts\"",[434,1596,1597],{"class":447},",       ",[434,1599,1600],{"class":541},"// Ignore root routes starting with _\n",[434,1602,1603],{"class":436,"line":662},[434,1604,1605],{"class":447},"  ],\n",[434,1607,1608],{"class":436,"line":1266},[434,1609,576],{"class":447},[400,1611,1613],{"id":1612},"programmatic-route-handlers","Programmatic route handlers",[405,1615,1616,1617,1619],{},"In addition to filesystem routing, you can register route handlers programmatically using the ",[409,1618,1514],{}," config option.",[734,1621,1623,1625],{"id":1622},"routes-config",[409,1624,1514],{}," config",[405,1627,1628,1629,1631],{},"The ",[409,1630,1514],{}," option allows you to map route patterns to handlers:",[425,1633,1635],{"className":427,"code":1634,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routes: {\n    \"/api/hello\": \"./server/routes/api/hello.ts\",\n    \"/api/custom\": {\n      handler: \"./server/routes/api/hello.ts\",\n      method: \"POST\",\n      lazy: true,\n    },\n    \"/virtual\": {\n      handler: \"#virtual-route\",\n    },\n  },\n});\n",[409,1636,1637,1649,1653,1663,1668,1682,1690,1699,1709,1718,1723,1731,1741,1746,1752],{"__ignoreMap":5},[434,1638,1639,1641,1643,1645,1647],{"class":436,"line":437},[434,1640,441],{"class":440},[434,1642,1539],{"class":447},[434,1644,451],{"class":440},[434,1646,1544],{"class":454},[434,1648,458],{"class":447},[434,1650,1651],{"class":436,"line":461},[434,1652,465],{"emptyLinePlaceholder":464},[434,1654,1655,1657,1659,1661],{"class":436,"line":468},[434,1656,471],{"class":440},[434,1658,474],{"class":440},[434,1660,1559],{"class":486},[434,1662,1562],{"class":447},[434,1664,1665],{"class":436,"line":499},[434,1666,1667],{"class":447},"  routes: {\n",[434,1669,1670,1673,1676,1679],{"class":436,"line":510},[434,1671,1672],{"class":454},"    \"/api/hello\"",[434,1674,1675],{"class":447},": ",[434,1677,1678],{"class":454},"\"./server/routes/api/hello.ts\"",[434,1680,1681],{"class":447},",\n",[434,1683,1684,1687],{"class":436,"line":573},[434,1685,1686],{"class":454},"    \"/api/custom\"",[434,1688,1689],{"class":447},": {\n",[434,1691,1692,1695,1697],{"class":436,"line":656},[434,1693,1694],{"class":447},"      handler: ",[434,1696,1678],{"class":454},[434,1698,1681],{"class":447},[434,1700,1701,1704,1707],{"class":436,"line":662},[434,1702,1703],{"class":447},"      method: ",[434,1705,1706],{"class":454},"\"POST\"",[434,1708,1681],{"class":447},[434,1710,1711,1714,1716],{"class":436,"line":1266},[434,1712,1713],{"class":447},"      lazy: ",[434,1715,1372],{"class":885},[434,1717,1681],{"class":447},[434,1719,1720],{"class":436,"line":1276},[434,1721,1722],{"class":447},"    },\n",[434,1724,1726,1729],{"class":436,"line":1725},11,[434,1727,1728],{"class":454},"    \"/virtual\"",[434,1730,1689],{"class":447},[434,1732,1734,1736,1739],{"class":436,"line":1733},12,[434,1735,1694],{"class":447},[434,1737,1738],{"class":454},"\"#virtual-route\"",[434,1740,1681],{"class":447},[434,1742,1744],{"class":436,"line":1743},13,[434,1745,1722],{"class":447},[434,1747,1749],{"class":436,"line":1748},14,[434,1750,1751],{"class":447},"  },\n",[434,1753,1755],{"class":436,"line":1754},15,[434,1756,576],{"class":447},[405,1758,1759],{},"Each route entry can be a simple string (handler path) or an object with the following options:",[1761,1762,1763,1779],"table",{},[1764,1765,1766],"thead",{},[1767,1768,1769,1773,1776],"tr",{},[1770,1771,1772],"th",{},"Option",[1770,1774,1775],{},"Type",[1770,1777,1778],{},"Description",[1780,1781,1782,1798,1817,1832,1851],"tbody",{},[1767,1783,1784,1790,1795],{},[1785,1786,1787],"td",{},[409,1788,1789],{},"handler",[1785,1791,1792],{},[409,1793,1794],{},"string",[1785,1796,1797],{},"Path to event handler file or virtual module ID",[1767,1799,1800,1805,1809],{},[1785,1801,1802],{},[409,1803,1804],{},"method",[1785,1806,1807],{},[409,1808,1794],{},[1785,1810,1811,1812,1001,1814,1816],{},"HTTP method to match (",[409,1813,1158],{},[409,1815,1161],{},", etc.)",[1767,1818,1819,1824,1829],{},[1785,1820,1821],{},[409,1822,1823],{},"lazy",[1785,1825,1826],{},[409,1827,1828],{},"boolean",[1785,1830,1831],{},"Use lazy loading to import handler",[1767,1833,1834,1839,1844],{},[1785,1835,1836],{},[409,1837,1838],{},"format",[1785,1840,1841],{},[409,1842,1843],{},"\"web\" | \"node\"",[1785,1845,1846,1847,1850],{},"Handler type. ",[409,1848,1849],{},"\"node\""," handlers are converted to web-compatible",[1767,1852,1853,1858,1863],{},[1785,1854,1855],{},[409,1856,1857],{},"env",[1785,1859,1860],{},[409,1861,1862],{},"string | string[]",[1785,1864,1865,1866,1001,1869,1001,1872,1875],{},"Environments to include this handler (",[409,1867,1868],{},"\"dev\"",[409,1870,1871],{},"\"prod\"",[409,1873,1874],{},"\"prerender\"",", or a preset name)",[734,1877,1879,1625],{"id":1878},"handlers-config",[409,1880,1881],{},"handlers",[405,1883,1628,1884,1886],{},[409,1885,1881],{}," array is useful for registering middleware with control over route matching:",[425,1888,1890],{"className":427,"code":1889,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  handlers: [\n    {\n      route: \"/api/**\",\n      handler: \"./server/middleware/api-auth.ts\",\n      middleware: true,\n    },\n  ],\n});\n",[409,1891,1892,1904,1908,1918,1923,1928,1938,1947,1956,1960,1964],{"__ignoreMap":5},[434,1893,1894,1896,1898,1900,1902],{"class":436,"line":437},[434,1895,441],{"class":440},[434,1897,1539],{"class":447},[434,1899,451],{"class":440},[434,1901,1544],{"class":454},[434,1903,458],{"class":447},[434,1905,1906],{"class":436,"line":461},[434,1907,465],{"emptyLinePlaceholder":464},[434,1909,1910,1912,1914,1916],{"class":436,"line":468},[434,1911,471],{"class":440},[434,1913,474],{"class":440},[434,1915,1559],{"class":486},[434,1917,1562],{"class":447},[434,1919,1920],{"class":436,"line":499},[434,1921,1922],{"class":447},"  handlers: [\n",[434,1924,1925],{"class":436,"line":510},[434,1926,1927],{"class":447},"    {\n",[434,1929,1930,1933,1936],{"class":436,"line":573},[434,1931,1932],{"class":447},"      route: ",[434,1934,1935],{"class":454},"\"/api/**\"",[434,1937,1681],{"class":447},[434,1939,1940,1942,1945],{"class":436,"line":656},[434,1941,1694],{"class":447},[434,1943,1944],{"class":454},"\"./server/middleware/api-auth.ts\"",[434,1946,1681],{"class":447},[434,1948,1949,1952,1954],{"class":436,"line":662},[434,1950,1951],{"class":447},"      middleware: ",[434,1953,1372],{"class":885},[434,1955,1681],{"class":447},[434,1957,1958],{"class":436,"line":1266},[434,1959,1722],{"class":447},[434,1961,1962],{"class":436,"line":1276},[434,1963,1605],{"class":447},[434,1965,1966],{"class":436,"line":1725},[434,1967,576],{"class":447},[405,1969,1970],{},"Each handler entry supports the following options:",[1761,1972,1973,1983],{},[1764,1974,1975],{},[1767,1976,1977,1979,1981],{},[1770,1978,1772],{},[1770,1980,1775],{},[1770,1982,1778],{},[1780,1984,1985,2008,2020,2036,2050,2062,2076],{},[1767,1986,1987,1992,1996],{},[1785,1988,1989],{},[409,1990,1991],{},"route",[1785,1993,1994],{},[409,1995,1794],{},[1785,1997,1998,1999,1001,2002,1001,2005,680],{},"HTTP pathname pattern (e.g., ",[409,2000,2001],{},"/test",[409,2003,2004],{},"/api/:id",[409,2006,2007],{},"/blog/**",[1767,2009,2010,2014,2018],{},[1785,2011,2012],{},[409,2013,1789],{},[1785,2015,2016],{},[409,2017,1794],{},[1785,2019,1797],{},[1767,2021,2022,2026,2030],{},[1785,2023,2024],{},[409,2025,1804],{},[1785,2027,2028],{},[409,2029,1794],{},[1785,2031,1811,2032,1001,2034,1816],{},[409,2033,1158],{},[409,2035,1161],{},[1767,2037,2038,2043,2047],{},[1785,2039,2040],{},[409,2041,2042],{},"middleware",[1785,2044,2045],{},[409,2046,1828],{},[1785,2048,2049],{},"Run handler as middleware before route handlers",[1767,2051,2052,2056,2060],{},[1785,2053,2054],{},[409,2055,1823],{},[1785,2057,2058],{},[409,2059,1828],{},[1785,2061,1831],{},[1767,2063,2064,2068,2072],{},[1785,2065,2066],{},[409,2067,1838],{},[1785,2069,2070],{},[409,2071,1843],{},[1785,2073,1846,2074,1850],{},[409,2075,1849],{},[1767,2077,2078,2082,2086],{},[1785,2079,2080],{},[409,2081,1857],{},[1785,2083,2084],{},[409,2085,1862],{},[1785,2087,1865,2088,1001,2090,1001,2092,1875],{},[409,2089,1868],{},[409,2091,1871],{},[409,2093,1874],{},[400,2095,285],{"id":2042},[405,2097,2098],{},"Nitro route middleware can hook into the request lifecycle.",[1504,2100,2101],{},[405,2102,2103],{},"A middleware can modify the request before it is processed, not after.",[405,2105,2106,2107,597],{},"Middleware are auto-registered within the ",[409,2108,2109],{},"middleware/",[425,2111,2115],{"className":2112,"code":2113,"language":2114,"meta":5,"style":5},"language-md shiki shiki-themes github-light github-dark github-dark","middleware/\n  auth.ts\n  logger.ts\n  ...\nroutes/\n  hello.ts\n","md",[409,2116,2117,2122,2127,2132,2137,2141],{"__ignoreMap":5},[434,2118,2119],{"class":436,"line":437},[434,2120,2121],{"class":447},"middleware/\n",[434,2123,2124],{"class":436,"line":461},[434,2125,2126],{"class":447},"  auth.ts\n",[434,2128,2129],{"class":436,"line":468},[434,2130,2131],{"class":447},"  logger.ts\n",[434,2133,2134],{"class":436,"line":499},[434,2135,2136],{"class":447},"  ...\n",[434,2138,2139],{"class":436,"line":510},[434,2140,628],{"class":447},[434,2142,2143],{"class":436,"line":573},[434,2144,2145],{"class":447},"  hello.ts\n",[734,2147,2149],{"id":2148},"simple-middleware","Simple middleware",[405,2151,2152],{},"Middleware are defined exactly like route handlers with the only exception that they should not return anything.\nReturning from middleware behaves like returning from a request - the value will be returned as a response and further code will not be ran.",[425,2154,2157],{"className":427,"code":2155,"filename":2156,"language":430,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler((event) => {\n  // Extends or modify the event\n  event.context.user = { name: \"Nitro\" };\n});\n","middleware/auth.ts",[409,2158,2159,2171,2175,2193,2198,2213],{"__ignoreMap":5},[434,2160,2161,2163,2165,2167,2169],{"class":436,"line":437},[434,2162,441],{"class":440},[434,2164,526],{"class":447},[434,2166,451],{"class":440},[434,2168,455],{"class":454},[434,2170,458],{"class":447},[434,2172,2173],{"class":436,"line":461},[434,2174,465],{"emptyLinePlaceholder":464},[434,2176,2177,2179,2181,2183,2185,2187,2189,2191],{"class":436,"line":468},[434,2178,471],{"class":440},[434,2180,474],{"class":440},[434,2182,551],{"class":486},[434,2184,554],{"class":447},[434,2186,411],{"class":480},[434,2188,490],{"class":447},[434,2190,493],{"class":440},[434,2192,496],{"class":447},[434,2194,2195],{"class":436,"line":499},[434,2196,2197],{"class":541},"  // Extends or modify the event\n",[434,2199,2200,2203,2205,2208,2211],{"class":436,"line":510},[434,2201,2202],{"class":447},"  event.context.user ",[434,2204,892],{"class":440},[434,2206,2207],{"class":447}," { name: ",[434,2209,2210],{"class":454},"\"Nitro\"",[434,2212,799],{"class":447},[434,2214,2215],{"class":436,"line":573},[434,2216,576],{"class":447},[405,2218,2219,2220,2222,2223,681],{},"Middleware in ",[409,2221,2109],{}," directory are automatically registered for all routes. If you want to register a middleware for a specific route, see ",[414,2224,2227],{"href":2225,"rel":2226},"https://h3.dev/guide/basics/handler#object-syntax",[418],"Object Syntax Event Handler",[728,2229,2230],{},[405,2231,2232,2233],{},"Returning anything from a middleware will close the request and should be avoided! Any returned value from middleware will be the response and further code will not be executed however ",[947,2234,2235],{},"this is not recommended to do!",[734,2237,2239],{"id":2238},"route-meta","Route Meta",[405,2241,2242,2243,2246],{},"You can define route handler meta at build-time using ",[409,2244,2245],{},"defineRouteMeta"," macro in the event handler files.",[2248,2249,2250],"important",{},[405,2251,2252],{},"\nThis feature is currently experimental.",[425,2254,2256],{"className":427,"code":2255,"filename":753,"language":430,"meta":5,"style":5},"import { defineRouteMeta } from \"nitro\";\nimport { defineHandler } from \"nitro\";\n\ndefineRouteMeta({\n  openAPI: {\n    tags: [\"test\"],\n    description: \"Test route description\",\n    parameters: [{ in: \"query\", name: \"test\", required: true }],\n  },\n});\n\nexport default defineHandler(() => \"OK\");\n",[409,2257,2258,2271,2283,2287,2293,2298,2309,2319,2340,2344,2348,2352],{"__ignoreMap":5},[434,2259,2260,2262,2265,2267,2269],{"class":436,"line":437},[434,2261,441],{"class":440},[434,2263,2264],{"class":447}," { defineRouteMeta } ",[434,2266,451],{"class":440},[434,2268,455],{"class":454},[434,2270,458],{"class":447},[434,2272,2273,2275,2277,2279,2281],{"class":436,"line":461},[434,2274,441],{"class":440},[434,2276,526],{"class":447},[434,2278,451],{"class":440},[434,2280,455],{"class":454},[434,2282,458],{"class":447},[434,2284,2285],{"class":436,"line":468},[434,2286,465],{"emptyLinePlaceholder":464},[434,2288,2289,2291],{"class":436,"line":499},[434,2290,2245],{"class":486},[434,2292,1562],{"class":447},[434,2294,2295],{"class":436,"line":510},[434,2296,2297],{"class":447},"  openAPI: {\n",[434,2299,2300,2303,2306],{"class":436,"line":573},[434,2301,2302],{"class":447},"    tags: [",[434,2304,2305],{"class":454},"\"test\"",[434,2307,2308],{"class":447},"],\n",[434,2310,2311,2314,2317],{"class":436,"line":656},[434,2312,2313],{"class":447},"    description: ",[434,2315,2316],{"class":454},"\"Test route description\"",[434,2318,1681],{"class":447},[434,2320,2321,2324,2327,2330,2332,2335,2337],{"class":436,"line":662},[434,2322,2323],{"class":447},"    parameters: [{ in: ",[434,2325,2326],{"class":454},"\"query\"",[434,2328,2329],{"class":447},", name: ",[434,2331,2305],{"class":454},[434,2333,2334],{"class":447},", required: ",[434,2336,1372],{"class":885},[434,2338,2339],{"class":447}," }],\n",[434,2341,2342],{"class":436,"line":1266},[434,2343,1751],{"class":447},[434,2345,2346],{"class":436,"line":1276},[434,2347,576],{"class":447},[434,2349,2350],{"class":436,"line":1725},[434,2351,465],{"emptyLinePlaceholder":464},[434,2353,2354,2356,2358,2360,2362,2364,2367],{"class":436,"line":1733},[434,2355,471],{"class":440},[434,2357,474],{"class":440},[434,2359,551],{"class":486},[434,2361,782],{"class":447},[434,2363,493],{"class":440},[434,2365,2366],{"class":454}," \"OK\"",[434,2368,2369],{"class":447},");\n",[2371,2372,2374],"read-more",{"to":2373},"https://swagger.io/specification/v3/",[405,2375,2376],{},"This feature is currently usable to specify OpenAPI meta. See swagger specification for available OpenAPI options.",[734,2378,2380],{"id":2379},"execution-order","Execution order",[405,2382,2383],{},"Middleware are executed in directory listing order.",[425,2385,2387],{"className":2112,"code":2386,"language":2114,"meta":5,"style":5},"middleware/\n  auth.ts \u003C-- First\n  logger.ts \u003C-- Second\n  ... \u003C-- Third\n",[409,2388,2389,2393,2398,2403],{"__ignoreMap":5},[434,2390,2391],{"class":436,"line":437},[434,2392,2121],{"class":447},[434,2394,2395],{"class":436,"line":461},[434,2396,2397],{"class":447},"  auth.ts \u003C-- First\n",[434,2399,2400],{"class":436,"line":468},[434,2401,2402],{"class":447},"  logger.ts \u003C-- Second\n",[434,2404,2405],{"class":436,"line":499},[434,2406,2407],{"class":447},"  ... \u003C-- Third\n",[405,2409,2410],{},"Prefix middleware with a number to control their execution order.",[425,2412,2414],{"className":2112,"code":2413,"language":2114,"meta":5,"style":5},"middleware/\n  1.logger.ts \u003C-- First\n  2.auth.ts \u003C-- Second\n  3.... \u003C-- Third\n",[409,2415,2416,2420,2425,2430],{"__ignoreMap":5},[434,2417,2418],{"class":436,"line":437},[434,2419,2121],{"class":447},[434,2421,2422],{"class":436,"line":461},[434,2423,2424],{"class":447},"  1.logger.ts \u003C-- First\n",[434,2426,2427],{"class":436,"line":468},[434,2428,2429],{"class":447},"  2.auth.ts \u003C-- Second\n",[434,2431,2432],{"class":436,"line":499},[434,2433,2434],{"class":447},"  3.... \u003C-- Third\n",[728,2436,2437],{},[405,2438,2439,2440,1001,2443,677,2446,2449,2450,2452,2453,2455,2456,2459,2460,2463,2464,2467],{},"Remember that file names are sorted as strings, thus for example if you have 3 files ",[409,2441,2442],{},"1.filename.ts",[409,2444,2445],{},"2.filename.ts",[409,2447,2448],{},"10.filename.ts",", the ",[409,2451,2448],{}," will come after the ",[409,2454,2442],{},". To avoid this, prefix ",[409,2457,2458],{},"1-9"," with a ",[409,2461,2462],{},"0"," like ",[409,2465,2466],{},"01",", if you have more than 10 middleware in the same directory.",[734,2469,2471],{"id":2470},"request-filtering","Request filtering",[405,2473,2474],{},"Middleware are executed on every request.",[405,2476,2477],{},"Apply custom logic to scope them to specific conditions.",[405,2479,2480],{},"For example, you can use the URL to apply a middleware to a specific route:",[425,2482,2484],{"className":427,"code":2483,"filename":2156,"language":430,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler((event) => {\n  // Will only execute for /auth route\n  if (event.url.pathname.startsWith('/auth')) {\n    event.context.user = { name: \"Nitro\" };\n  }\n});\n",[409,2485,2486,2498,2502,2520,2525,2544,2557,2562],{"__ignoreMap":5},[434,2487,2488,2490,2492,2494,2496],{"class":436,"line":437},[434,2489,441],{"class":440},[434,2491,526],{"class":447},[434,2493,451],{"class":440},[434,2495,455],{"class":454},[434,2497,458],{"class":447},[434,2499,2500],{"class":436,"line":461},[434,2501,465],{"emptyLinePlaceholder":464},[434,2503,2504,2506,2508,2510,2512,2514,2516,2518],{"class":436,"line":468},[434,2505,471],{"class":440},[434,2507,474],{"class":440},[434,2509,551],{"class":486},[434,2511,554],{"class":447},[434,2513,411],{"class":480},[434,2515,490],{"class":447},[434,2517,493],{"class":440},[434,2519,496],{"class":447},[434,2521,2522],{"class":436,"line":499},[434,2523,2524],{"class":541},"  // Will only execute for /auth route\n",[434,2526,2527,2530,2533,2536,2538,2541],{"class":436,"line":510},[434,2528,2529],{"class":440},"  if",[434,2531,2532],{"class":447}," (event.url.pathname.",[434,2534,2535],{"class":486},"startsWith",[434,2537,676],{"class":447},[434,2539,2540],{"class":454},"'/auth'",[434,2542,2543],{"class":447},")) {\n",[434,2545,2546,2549,2551,2553,2555],{"class":436,"line":573},[434,2547,2548],{"class":447},"    event.context.user ",[434,2550,892],{"class":440},[434,2552,2207],{"class":447},[434,2554,2210],{"class":454},[434,2556,799],{"class":447},[434,2558,2559],{"class":436,"line":656},[434,2560,2561],{"class":447},"  }\n",[434,2563,2564],{"class":436,"line":662},[434,2565,576],{"class":447},[734,2567,2569],{"id":2568},"route-scoped-middleware","Route-scoped middleware",[405,2571,2572,2573,2578,2579,2581,2582,483],{},"You can register middleware for specific route patterns using the ",[414,2574,2576],{"href":2575},"#handlers-config",[409,2577,1881],{}," config with the ",[409,2580,2042],{}," option and a specific ",[409,2583,1991],{},[425,2585,2586],{"className":427,"code":1889,"filename":1530,"language":430,"meta":5,"style":5},[409,2587,2588,2600,2604,2614,2618,2622,2630,2638,2646,2650,2654],{"__ignoreMap":5},[434,2589,2590,2592,2594,2596,2598],{"class":436,"line":437},[434,2591,441],{"class":440},[434,2593,1539],{"class":447},[434,2595,451],{"class":440},[434,2597,1544],{"class":454},[434,2599,458],{"class":447},[434,2601,2602],{"class":436,"line":461},[434,2603,465],{"emptyLinePlaceholder":464},[434,2605,2606,2608,2610,2612],{"class":436,"line":468},[434,2607,471],{"class":440},[434,2609,474],{"class":440},[434,2611,1559],{"class":486},[434,2613,1562],{"class":447},[434,2615,2616],{"class":436,"line":499},[434,2617,1922],{"class":447},[434,2619,2620],{"class":436,"line":510},[434,2621,1927],{"class":447},[434,2623,2624,2626,2628],{"class":436,"line":573},[434,2625,1932],{"class":447},[434,2627,1935],{"class":454},[434,2629,1681],{"class":447},[434,2631,2632,2634,2636],{"class":436,"line":656},[434,2633,1694],{"class":447},[434,2635,1944],{"class":454},[434,2637,1681],{"class":447},[434,2639,2640,2642,2644],{"class":436,"line":662},[434,2641,1951],{"class":447},[434,2643,1372],{"class":885},[434,2645,1681],{"class":447},[434,2647,2648],{"class":436,"line":1266},[434,2649,1722],{"class":447},[434,2651,2652],{"class":436,"line":1276},[434,2653,1605],{"class":447},[434,2655,2656],{"class":436,"line":1725},[434,2657,576],{"class":447},[405,2659,2660,2661,2663,2664,2667],{},"Unlike global middleware (registered in the ",[409,2662,2109],{}," directory which match ",[409,2665,2666],{},"/**","), route-scoped middleware only run for requests matching the specified pattern.",[400,2669,2671],{"id":2670},"error-handling","Error handling",[405,2673,1522,2674,2679],{},[414,2675,2678],{"href":2676,"rel":2677},"https://h3.dev/guide/basics/error",[418],"utilities available in H3"," to handle errors in both routes and middlewares.",[405,2681,2682,2683,2686,2687,2690],{},"The way errors are sent back to the client depends on the environment. In development, requests with an ",[409,2684,2685],{},"Accept"," header of ",[409,2688,2689],{},"text/html"," (such as browsers) will receive a HTML error page. In production, errors are always sent in JSON.",[405,2692,2693,2694,593,2696,2699],{},"This behaviour can be overridden by some request properties (e.g.: ",[409,2695,2685],{},[409,2697,2698],{},"User-Agent"," headers).",[400,2701,2703],{"id":2702},"code-splitting","Code splitting",[405,2705,2706,2707,2710,2711,681],{},"Nitro creates a separate chunk for each route handler. Chunks load on-demand when first requested, so ",[409,2708,2709],{},"/api/users"," doesn't load code for ",[409,2712,2713],{},"/api/posts",[405,2715,2716,2717,2723],{},"See ",[414,2718,2720],{"href":2719},"/config#inlinedynamicimports",[409,2721,2722],{},"inlineDynamicImports"," to bundle everything into a single file.",[400,2725,2727],{"id":2726},"route-rules","Route rules",[405,2729,2730],{},"Nitro allows you to add logic at the top-level for each route of your configuration. It can be used for redirecting, proxying, caching, authentication, and adding headers to routes.",[405,2732,2733,2734,2739],{},"It is a map from route pattern (following ",[414,2735,2738],{"href":2736,"rel":2737},"https://github.com/h3js/rou3",[418],"rou3",") to route options.",[405,2741,2742,2743,2746,2747,2750,2751,2754],{},"When ",[409,2744,2745],{},"cache"," option is set, handlers matching pattern will be automatically wrapped with ",[409,2748,2749],{},"defineCachedEventHandler",". See the ",[414,2752,2753],{"href":69},"cache guide"," to learn more about this function.",[728,2756,2757],{},[405,2758,2759,2762,2763],{},[409,2760,2761],{},"swr: true|number"," is shortcut for ",[409,2764,2765],{},"cache: { swr: true, maxAge: number }",[405,2767,2768,2769,2772],{},"You can set route rules in the ",[409,2770,2771],{},"nitro.routeRules"," options.",[425,2774,2776],{"className":427,"code":2775,"filename":1530,"language":430,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/blog/**': { swr: true },\n    '/blog2/**': { swr: 600 },\n    '/blog3/**': { static: true },\n    '/blog4/**': { cache: { /* cache options*/ } },\n    '/assets/**': { headers: { 'cache-control': 's-maxage=0' } },\n    '/api/v1/**': { cors: true, headers: { 'access-control-allow-methods': 'GET' } },\n    '/old-page': { redirect: '/new-page' },\n    '/old-page/**': { redirect: '/new-page/**' },\n    '/proxy/example': { proxy: 'https://example.com' },\n    '/proxy/**': { proxy: '/api/**' },\n    '/admin/**': { basicAuth: { username: 'admin', password: 'supersecret' } },\n  }\n});\n",[409,2777,2778,2791,2795,2805,2810,2823,2835,2847,2861,2879,2902,2915,2927,2940,2952,2971,2976],{"__ignoreMap":5},[434,2779,2780,2782,2785,2787,2789],{"class":436,"line":437},[434,2781,441],{"class":440},[434,2783,2784],{"class":447}," { defineConfig } ",[434,2786,451],{"class":440},[434,2788,455],{"class":454},[434,2790,458],{"class":447},[434,2792,2793],{"class":436,"line":461},[434,2794,465],{"emptyLinePlaceholder":464},[434,2796,2797,2799,2801,2803],{"class":436,"line":468},[434,2798,471],{"class":440},[434,2800,474],{"class":440},[434,2802,1559],{"class":486},[434,2804,1562],{"class":447},[434,2806,2807],{"class":436,"line":499},[434,2808,2809],{"class":447},"  routeRules: {\n",[434,2811,2812,2815,2818,2820],{"class":436,"line":510},[434,2813,2814],{"class":454},"    '/blog/**'",[434,2816,2817],{"class":447},": { swr: ",[434,2819,1372],{"class":885},[434,2821,2822],{"class":447}," },\n",[434,2824,2825,2828,2830,2833],{"class":436,"line":573},[434,2826,2827],{"class":454},"    '/blog2/**'",[434,2829,2817],{"class":447},[434,2831,2832],{"class":885},"600",[434,2834,2822],{"class":447},[434,2836,2837,2840,2843,2845],{"class":436,"line":656},[434,2838,2839],{"class":454},"    '/blog3/**'",[434,2841,2842],{"class":447},": { static: ",[434,2844,1372],{"class":885},[434,2846,2822],{"class":447},[434,2848,2849,2852,2855,2858],{"class":436,"line":662},[434,2850,2851],{"class":454},"    '/blog4/**'",[434,2853,2854],{"class":447},": { cache: { ",[434,2856,2857],{"class":541},"/* cache options*/",[434,2859,2860],{"class":447}," } },\n",[434,2862,2863,2866,2869,2872,2874,2877],{"class":436,"line":1266},[434,2864,2865],{"class":454},"    '/assets/**'",[434,2867,2868],{"class":447},": { headers: { ",[434,2870,2871],{"class":454},"'cache-control'",[434,2873,1675],{"class":447},[434,2875,2876],{"class":454},"'s-maxage=0'",[434,2878,2860],{"class":447},[434,2880,2881,2884,2887,2889,2892,2895,2897,2900],{"class":436,"line":1276},[434,2882,2883],{"class":454},"    '/api/v1/**'",[434,2885,2886],{"class":447},": { cors: ",[434,2888,1372],{"class":885},[434,2890,2891],{"class":447},", headers: { ",[434,2893,2894],{"class":454},"'access-control-allow-methods'",[434,2896,1675],{"class":447},[434,2898,2899],{"class":454},"'GET'",[434,2901,2860],{"class":447},[434,2903,2904,2907,2910,2913],{"class":436,"line":1725},[434,2905,2906],{"class":454},"    '/old-page'",[434,2908,2909],{"class":447},": { redirect: ",[434,2911,2912],{"class":454},"'/new-page'",[434,2914,2822],{"class":447},[434,2916,2917,2920,2922,2925],{"class":436,"line":1733},[434,2918,2919],{"class":454},"    '/old-page/**'",[434,2921,2909],{"class":447},[434,2923,2924],{"class":454},"'/new-page/**'",[434,2926,2822],{"class":447},[434,2928,2929,2932,2935,2938],{"class":436,"line":1743},[434,2930,2931],{"class":454},"    '/proxy/example'",[434,2933,2934],{"class":447},": { proxy: ",[434,2936,2937],{"class":454},"'https://example.com'",[434,2939,2822],{"class":447},[434,2941,2942,2945,2947,2950],{"class":436,"line":1748},[434,2943,2944],{"class":454},"    '/proxy/**'",[434,2946,2934],{"class":447},[434,2948,2949],{"class":454},"'/api/**'",[434,2951,2822],{"class":447},[434,2953,2954,2957,2960,2963,2966,2969],{"class":436,"line":1754},[434,2955,2956],{"class":454},"    '/admin/**'",[434,2958,2959],{"class":447},": { basicAuth: { username: ",[434,2961,2962],{"class":454},"'admin'",[434,2964,2965],{"class":447},", password: ",[434,2967,2968],{"class":454},"'supersecret'",[434,2970,2860],{"class":447},[434,2972,2974],{"class":436,"line":2973},16,[434,2975,2561],{"class":447},[434,2977,2979],{"class":436,"line":2978},17,[434,2980,576],{"class":447},[734,2982,2984],{"id":2983},"rule-merging-and-overrides","Rule merging and overrides",[405,2986,2987],{},"Route rules are matched from least specific to most specific. When multiple rules match a request, their options are merged, with more specific rules taking precedence.",[405,2989,2990,2991,2994],{},"You can use ",[409,2992,2993],{},"false"," to disable a rule that was set by a more general pattern:",[425,2996,2998],{"className":427,"code":2997,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/api/cached/**': { swr: true },\n    '/api/cached/no-cache': { cache: false, swr: false },\n    '/admin/**': { basicAuth: { username: 'admin', password: 'secret' } },\n    '/admin/public/**': { basicAuth: false },\n  }\n});\n",[409,2999,3000,3012,3016,3026,3030,3041,3058,3073,3085,3089],{"__ignoreMap":5},[434,3001,3002,3004,3006,3008,3010],{"class":436,"line":437},[434,3003,441],{"class":440},[434,3005,1539],{"class":447},[434,3007,451],{"class":440},[434,3009,1544],{"class":454},[434,3011,458],{"class":447},[434,3013,3014],{"class":436,"line":461},[434,3015,465],{"emptyLinePlaceholder":464},[434,3017,3018,3020,3022,3024],{"class":436,"line":468},[434,3019,471],{"class":440},[434,3021,474],{"class":440},[434,3023,1559],{"class":486},[434,3025,1562],{"class":447},[434,3027,3028],{"class":436,"line":499},[434,3029,2809],{"class":447},[434,3031,3032,3035,3037,3039],{"class":436,"line":510},[434,3033,3034],{"class":454},"    '/api/cached/**'",[434,3036,2817],{"class":447},[434,3038,1372],{"class":885},[434,3040,2822],{"class":447},[434,3042,3043,3046,3049,3051,3054,3056],{"class":436,"line":573},[434,3044,3045],{"class":454},"    '/api/cached/no-cache'",[434,3047,3048],{"class":447},": { cache: ",[434,3050,2993],{"class":885},[434,3052,3053],{"class":447},", swr: ",[434,3055,2993],{"class":885},[434,3057,2822],{"class":447},[434,3059,3060,3062,3064,3066,3068,3071],{"class":436,"line":656},[434,3061,2956],{"class":454},[434,3063,2959],{"class":447},[434,3065,2962],{"class":454},[434,3067,2965],{"class":447},[434,3069,3070],{"class":454},"'secret'",[434,3072,2860],{"class":447},[434,3074,3075,3078,3081,3083],{"class":436,"line":662},[434,3076,3077],{"class":454},"    '/admin/public/**'",[434,3079,3080],{"class":447},": { basicAuth: ",[434,3082,2993],{"class":885},[434,3084,2822],{"class":447},[434,3086,3087],{"class":436,"line":1266},[434,3088,2561],{"class":447},[434,3090,3091],{"class":436,"line":1276},[434,3092,576],{"class":447},[734,3094,3096],{"id":3095},"headers","Headers",[405,3098,3099],{},"Set custom response headers for matching routes:",[425,3101,3103],{"className":427,"code":3102,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/api/**': { headers: { 'cache-control': 's-maxage=60' } },\n    '**': { headers: { 'x-powered-by': 'Nitro' } },\n  }\n});\n",[409,3104,3105,3117,3121,3131,3135,3151,3168,3172],{"__ignoreMap":5},[434,3106,3107,3109,3111,3113,3115],{"class":436,"line":437},[434,3108,441],{"class":440},[434,3110,1539],{"class":447},[434,3112,451],{"class":440},[434,3114,1544],{"class":454},[434,3116,458],{"class":447},[434,3118,3119],{"class":436,"line":461},[434,3120,465],{"emptyLinePlaceholder":464},[434,3122,3123,3125,3127,3129],{"class":436,"line":468},[434,3124,471],{"class":440},[434,3126,474],{"class":440},[434,3128,1559],{"class":486},[434,3130,1562],{"class":447},[434,3132,3133],{"class":436,"line":499},[434,3134,2809],{"class":447},[434,3136,3137,3140,3142,3144,3146,3149],{"class":436,"line":510},[434,3138,3139],{"class":454},"    '/api/**'",[434,3141,2868],{"class":447},[434,3143,2871],{"class":454},[434,3145,1675],{"class":447},[434,3147,3148],{"class":454},"'s-maxage=60'",[434,3150,2860],{"class":447},[434,3152,3153,3156,3158,3161,3163,3166],{"class":436,"line":573},[434,3154,3155],{"class":454},"    '**'",[434,3157,2868],{"class":447},[434,3159,3160],{"class":454},"'x-powered-by'",[434,3162,1675],{"class":447},[434,3164,3165],{"class":454},"'Nitro'",[434,3167,2860],{"class":447},[434,3169,3170],{"class":436,"line":656},[434,3171,2561],{"class":447},[434,3173,3174],{"class":436,"line":662},[434,3175,576],{"class":447},[734,3177,3179],{"id":3178},"cors","CORS",[405,3181,3182,3183,3186,3187,1001,3190,1001,3193,3196,3197,681],{},"Enable CORS headers with the ",[409,3184,3185],{},"cors: true"," shortcut. This sets ",[409,3188,3189],{},"access-control-allow-origin: *",[409,3191,3192],{},"access-control-allow-methods: *",[409,3194,3195],{},"access-control-allow-headers: *",", and ",[409,3198,3199],{},"access-control-max-age: 0",[405,3201,3202,3203,483],{},"You can override individual CORS headers using ",[409,3204,3095],{},[425,3206,3208],{"className":427,"code":3207,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/api/v1/**': {\n      cors: true,\n      headers: { 'access-control-allow-methods': 'GET' },\n    },\n  }\n});\n",[409,3209,3210,3222,3226,3236,3240,3246,3255,3268,3272,3276],{"__ignoreMap":5},[434,3211,3212,3214,3216,3218,3220],{"class":436,"line":437},[434,3213,441],{"class":440},[434,3215,1539],{"class":447},[434,3217,451],{"class":440},[434,3219,1544],{"class":454},[434,3221,458],{"class":447},[434,3223,3224],{"class":436,"line":461},[434,3225,465],{"emptyLinePlaceholder":464},[434,3227,3228,3230,3232,3234],{"class":436,"line":468},[434,3229,471],{"class":440},[434,3231,474],{"class":440},[434,3233,1559],{"class":486},[434,3235,1562],{"class":447},[434,3237,3238],{"class":436,"line":499},[434,3239,2809],{"class":447},[434,3241,3242,3244],{"class":436,"line":510},[434,3243,2883],{"class":454},[434,3245,1689],{"class":447},[434,3247,3248,3251,3253],{"class":436,"line":573},[434,3249,3250],{"class":447},"      cors: ",[434,3252,1372],{"class":885},[434,3254,1681],{"class":447},[434,3256,3257,3260,3262,3264,3266],{"class":436,"line":656},[434,3258,3259],{"class":447},"      headers: { ",[434,3261,2894],{"class":454},[434,3263,1675],{"class":447},[434,3265,2899],{"class":454},[434,3267,2822],{"class":447},[434,3269,3270],{"class":436,"line":662},[434,3271,1722],{"class":447},[434,3273,3274],{"class":436,"line":1266},[434,3275,2561],{"class":447},[434,3277,3278],{"class":436,"line":1276},[434,3279,576],{"class":447},[734,3281,3283],{"id":3282},"redirect","Redirect",[405,3285,3286,3287,3290],{},"Redirect matching routes to another URL. Use a string for a simple redirect (defaults to ",[409,3288,3289],{},"307"," status), or an object for more control:",[425,3292,3294],{"className":427,"code":3293,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    // Simple redirect (307 status)\n    '/old-page': { redirect: '/new-page' },\n    // Redirect with custom status\n    '/legacy': { redirect: { to: 'https://example.com/', status: 308 } },\n    // Wildcard redirect — preserves the path after the pattern\n    '/old-blog/**': { redirect: 'https://blog.example.com/**' },\n  }\n});\n",[409,3295,3296,3308,3312,3322,3326,3331,3341,3346,3365,3370,3382,3386],{"__ignoreMap":5},[434,3297,3298,3300,3302,3304,3306],{"class":436,"line":437},[434,3299,441],{"class":440},[434,3301,1539],{"class":447},[434,3303,451],{"class":440},[434,3305,1544],{"class":454},[434,3307,458],{"class":447},[434,3309,3310],{"class":436,"line":461},[434,3311,465],{"emptyLinePlaceholder":464},[434,3313,3314,3316,3318,3320],{"class":436,"line":468},[434,3315,471],{"class":440},[434,3317,474],{"class":440},[434,3319,1559],{"class":486},[434,3321,1562],{"class":447},[434,3323,3324],{"class":436,"line":499},[434,3325,2809],{"class":447},[434,3327,3328],{"class":436,"line":510},[434,3329,3330],{"class":541},"    // Simple redirect (307 status)\n",[434,3332,3333,3335,3337,3339],{"class":436,"line":573},[434,3334,2906],{"class":454},[434,3336,2909],{"class":447},[434,3338,2912],{"class":454},[434,3340,2822],{"class":447},[434,3342,3343],{"class":436,"line":656},[434,3344,3345],{"class":541},"    // Redirect with custom status\n",[434,3347,3348,3351,3354,3357,3360,3363],{"class":436,"line":662},[434,3349,3350],{"class":454},"    '/legacy'",[434,3352,3353],{"class":447},": { redirect: { to: ",[434,3355,3356],{"class":454},"'https://example.com/'",[434,3358,3359],{"class":447},", status: ",[434,3361,3362],{"class":885},"308",[434,3364,2860],{"class":447},[434,3366,3367],{"class":436,"line":1266},[434,3368,3369],{"class":541},"    // Wildcard redirect — preserves the path after the pattern\n",[434,3371,3372,3375,3377,3380],{"class":436,"line":1276},[434,3373,3374],{"class":454},"    '/old-blog/**'",[434,3376,2909],{"class":447},[434,3378,3379],{"class":454},"'https://blog.example.com/**'",[434,3381,2822],{"class":447},[434,3383,3384],{"class":436,"line":1725},[434,3385,2561],{"class":447},[434,3387,3388],{"class":436,"line":1733},[434,3389,576],{"class":447},[734,3391,3393],{"id":3392},"proxy","Proxy",[405,3395,3396],{},"Proxy requests to another URL. Supports both internal and external targets:",[425,3398,3400],{"className":427,"code":3399,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    // Proxy to exact URL\n    '/api/proxy/example': { proxy: 'https://example.com' },\n    // Proxy to internal route\n    '/api/proxy/**': { proxy: '/api/echo' },\n    // Wildcard proxy — preserves the path after the pattern\n    '/cdn/**': { proxy: 'https://cdn.jsdelivr.net/**' },\n    // Proxy with options\n    '/external/**': {\n      proxy: {\n        to: 'https://api.example.com/**',\n        // Additional H3 proxy options...\n      },\n    },\n  }\n});\n",[409,3401,3402,3414,3418,3428,3432,3437,3448,3453,3465,3470,3482,3487,3494,3499,3509,3514,3519,3523,3528],{"__ignoreMap":5},[434,3403,3404,3406,3408,3410,3412],{"class":436,"line":437},[434,3405,441],{"class":440},[434,3407,1539],{"class":447},[434,3409,451],{"class":440},[434,3411,1544],{"class":454},[434,3413,458],{"class":447},[434,3415,3416],{"class":436,"line":461},[434,3417,465],{"emptyLinePlaceholder":464},[434,3419,3420,3422,3424,3426],{"class":436,"line":468},[434,3421,471],{"class":440},[434,3423,474],{"class":440},[434,3425,1559],{"class":486},[434,3427,1562],{"class":447},[434,3429,3430],{"class":436,"line":499},[434,3431,2809],{"class":447},[434,3433,3434],{"class":436,"line":510},[434,3435,3436],{"class":541},"    // Proxy to exact URL\n",[434,3438,3439,3442,3444,3446],{"class":436,"line":573},[434,3440,3441],{"class":454},"    '/api/proxy/example'",[434,3443,2934],{"class":447},[434,3445,2937],{"class":454},[434,3447,2822],{"class":447},[434,3449,3450],{"class":436,"line":656},[434,3451,3452],{"class":541},"    // Proxy to internal route\n",[434,3454,3455,3458,3460,3463],{"class":436,"line":662},[434,3456,3457],{"class":454},"    '/api/proxy/**'",[434,3459,2934],{"class":447},[434,3461,3462],{"class":454},"'/api/echo'",[434,3464,2822],{"class":447},[434,3466,3467],{"class":436,"line":1266},[434,3468,3469],{"class":541},"    // Wildcard proxy — preserves the path after the pattern\n",[434,3471,3472,3475,3477,3480],{"class":436,"line":1276},[434,3473,3474],{"class":454},"    '/cdn/**'",[434,3476,2934],{"class":447},[434,3478,3479],{"class":454},"'https://cdn.jsdelivr.net/**'",[434,3481,2822],{"class":447},[434,3483,3484],{"class":436,"line":1725},[434,3485,3486],{"class":541},"    // Proxy with options\n",[434,3488,3489,3492],{"class":436,"line":1733},[434,3490,3491],{"class":454},"    '/external/**'",[434,3493,1689],{"class":447},[434,3495,3496],{"class":436,"line":1743},[434,3497,3498],{"class":447},"      proxy: {\n",[434,3500,3501,3504,3507],{"class":436,"line":1748},[434,3502,3503],{"class":447},"        to: ",[434,3505,3506],{"class":454},"'https://api.example.com/**'",[434,3508,1681],{"class":447},[434,3510,3511],{"class":436,"line":1754},[434,3512,3513],{"class":541},"        // Additional H3 proxy options...\n",[434,3515,3516],{"class":436,"line":2973},[434,3517,3518],{"class":447},"      },\n",[434,3520,3521],{"class":436,"line":2978},[434,3522,1722],{"class":447},[434,3524,3526],{"class":436,"line":3525},18,[434,3527,2561],{"class":447},[434,3529,3531],{"class":436,"line":3530},19,[434,3532,576],{"class":447},[734,3534,3536],{"id":3535},"basic-auth","Basic auth",[405,3538,3539],{},"Protect routes with HTTP Basic Authentication:",[425,3541,3543],{"className":427,"code":3542,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/admin/**': {\n      basicAuth: {\n        username: 'admin',\n        password: 'supersecret',\n        realm: 'Admin Area',  // Optional, shown in the browser prompt\n      },\n    },\n    // Disable basic auth for a sub-path\n    '/admin/public/**': { basicAuth: false },\n  }\n});\n",[409,3544,3545,3557,3561,3571,3575,3581,3586,3595,3604,3618,3622,3626,3631,3641,3645],{"__ignoreMap":5},[434,3546,3547,3549,3551,3553,3555],{"class":436,"line":437},[434,3548,441],{"class":440},[434,3550,1539],{"class":447},[434,3552,451],{"class":440},[434,3554,1544],{"class":454},[434,3556,458],{"class":447},[434,3558,3559],{"class":436,"line":461},[434,3560,465],{"emptyLinePlaceholder":464},[434,3562,3563,3565,3567,3569],{"class":436,"line":468},[434,3564,471],{"class":440},[434,3566,474],{"class":440},[434,3568,1559],{"class":486},[434,3570,1562],{"class":447},[434,3572,3573],{"class":436,"line":499},[434,3574,2809],{"class":447},[434,3576,3577,3579],{"class":436,"line":510},[434,3578,2956],{"class":454},[434,3580,1689],{"class":447},[434,3582,3583],{"class":436,"line":573},[434,3584,3585],{"class":447},"      basicAuth: {\n",[434,3587,3588,3591,3593],{"class":436,"line":656},[434,3589,3590],{"class":447},"        username: ",[434,3592,2962],{"class":454},[434,3594,1681],{"class":447},[434,3596,3597,3600,3602],{"class":436,"line":662},[434,3598,3599],{"class":447},"        password: ",[434,3601,2968],{"class":454},[434,3603,1681],{"class":447},[434,3605,3606,3609,3612,3615],{"class":436,"line":1266},[434,3607,3608],{"class":447},"        realm: ",[434,3610,3611],{"class":454},"'Admin Area'",[434,3613,3614],{"class":447},",  ",[434,3616,3617],{"class":541},"// Optional, shown in the browser prompt\n",[434,3619,3620],{"class":436,"line":1276},[434,3621,3518],{"class":447},[434,3623,3624],{"class":436,"line":1725},[434,3625,1722],{"class":447},[434,3627,3628],{"class":436,"line":1733},[434,3629,3630],{"class":541},"    // Disable basic auth for a sub-path\n",[434,3632,3633,3635,3637,3639],{"class":436,"line":1743},[434,3634,3077],{"class":454},[434,3636,3080],{"class":447},[434,3638,2993],{"class":885},[434,3640,2822],{"class":447},[434,3642,3643],{"class":436,"line":1748},[434,3644,2561],{"class":447},[434,3646,3647],{"class":436,"line":1754},[434,3648,576],{"class":447},[734,3650,3652],{"id":3651},"caching-swr-static","Caching (SWR / Static)",[405,3654,3655,3656,1001,3658,3661,3662,3665],{},"Control caching behavior with ",[409,3657,2745],{},[409,3659,3660],{},"swr",", or ",[409,3663,3664],{},"static"," options:",[425,3667,3669],{"className":427,"code":3668,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    // Enable stale-while-revalidate caching\n    '/blog/**': { swr: true },\n    // SWR with maxAge in seconds\n    '/blog/posts/**': { swr: 600 },\n    // Full cache options\n    '/api/data/**': {\n      cache: {\n        maxAge: 60,\n        swr: true,\n        // ...other cache options\n      },\n    },\n    // Disable caching\n    '/api/realtime/**': { cache: false },\n  }\n});\n",[409,3670,3671,3683,3687,3697,3701,3706,3716,3721,3732,3737,3744,3749,3759,3768,3773,3777,3781,3786,3797,3801],{"__ignoreMap":5},[434,3672,3673,3675,3677,3679,3681],{"class":436,"line":437},[434,3674,441],{"class":440},[434,3676,1539],{"class":447},[434,3678,451],{"class":440},[434,3680,1544],{"class":454},[434,3682,458],{"class":447},[434,3684,3685],{"class":436,"line":461},[434,3686,465],{"emptyLinePlaceholder":464},[434,3688,3689,3691,3693,3695],{"class":436,"line":468},[434,3690,471],{"class":440},[434,3692,474],{"class":440},[434,3694,1559],{"class":486},[434,3696,1562],{"class":447},[434,3698,3699],{"class":436,"line":499},[434,3700,2809],{"class":447},[434,3702,3703],{"class":436,"line":510},[434,3704,3705],{"class":541},"    // Enable stale-while-revalidate caching\n",[434,3707,3708,3710,3712,3714],{"class":436,"line":573},[434,3709,2814],{"class":454},[434,3711,2817],{"class":447},[434,3713,1372],{"class":885},[434,3715,2822],{"class":447},[434,3717,3718],{"class":436,"line":656},[434,3719,3720],{"class":541},"    // SWR with maxAge in seconds\n",[434,3722,3723,3726,3728,3730],{"class":436,"line":662},[434,3724,3725],{"class":454},"    '/blog/posts/**'",[434,3727,2817],{"class":447},[434,3729,2832],{"class":885},[434,3731,2822],{"class":447},[434,3733,3734],{"class":436,"line":1266},[434,3735,3736],{"class":541},"    // Full cache options\n",[434,3738,3739,3742],{"class":436,"line":1276},[434,3740,3741],{"class":454},"    '/api/data/**'",[434,3743,1689],{"class":447},[434,3745,3746],{"class":436,"line":1725},[434,3747,3748],{"class":447},"      cache: {\n",[434,3750,3751,3754,3757],{"class":436,"line":1733},[434,3752,3753],{"class":447},"        maxAge: ",[434,3755,3756],{"class":885},"60",[434,3758,1681],{"class":447},[434,3760,3761,3764,3766],{"class":436,"line":1743},[434,3762,3763],{"class":447},"        swr: ",[434,3765,1372],{"class":885},[434,3767,1681],{"class":447},[434,3769,3770],{"class":436,"line":1748},[434,3771,3772],{"class":541},"        // ...other cache options\n",[434,3774,3775],{"class":436,"line":1754},[434,3776,3518],{"class":447},[434,3778,3779],{"class":436,"line":2973},[434,3780,1722],{"class":447},[434,3782,3783],{"class":436,"line":2978},[434,3784,3785],{"class":541},"    // Disable caching\n",[434,3787,3788,3791,3793,3795],{"class":436,"line":3525},[434,3789,3790],{"class":454},"    '/api/realtime/**'",[434,3792,3048],{"class":447},[434,3794,2993],{"class":885},[434,3796,2822],{"class":447},[434,3798,3799],{"class":436,"line":3530},[434,3800,2561],{"class":447},[434,3802,3804],{"class":436,"line":3803},20,[434,3805,576],{"class":447},[1504,3807,3808],{},[405,3809,3810,3813,3814,677,3817,3813,3820,681],{},[409,3811,3812],{},"swr: true"," is a shortcut for ",[409,3815,3816],{},"cache: { swr: true }",[409,3818,3819],{},"swr: \u003Cnumber>",[409,3821,3822],{},"cache: { swr: true, maxAge: \u003Cnumber> }",[734,3824,3826],{"id":3825},"prerender","Prerender",[405,3828,3829],{},"Mark routes for prerendering at build time:",[425,3831,3833],{"className":427,"code":3832,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/about': { prerender: true },\n    '/dynamic/**': { prerender: false },\n  }\n});\n",[409,3834,3835,3847,3851,3861,3865,3877,3888,3892],{"__ignoreMap":5},[434,3836,3837,3839,3841,3843,3845],{"class":436,"line":437},[434,3838,441],{"class":440},[434,3840,1539],{"class":447},[434,3842,451],{"class":440},[434,3844,1544],{"class":454},[434,3846,458],{"class":447},[434,3848,3849],{"class":436,"line":461},[434,3850,465],{"emptyLinePlaceholder":464},[434,3852,3853,3855,3857,3859],{"class":436,"line":468},[434,3854,471],{"class":440},[434,3856,474],{"class":440},[434,3858,1559],{"class":486},[434,3860,1562],{"class":447},[434,3862,3863],{"class":436,"line":499},[434,3864,2809],{"class":447},[434,3866,3867,3870,3873,3875],{"class":436,"line":510},[434,3868,3869],{"class":454},"    '/about'",[434,3871,3872],{"class":447},": { prerender: ",[434,3874,1372],{"class":885},[434,3876,2822],{"class":447},[434,3878,3879,3882,3884,3886],{"class":436,"line":573},[434,3880,3881],{"class":454},"    '/dynamic/**'",[434,3883,3872],{"class":447},[434,3885,2993],{"class":885},[434,3887,2822],{"class":447},[434,3889,3890],{"class":436,"line":656},[434,3891,2561],{"class":447},[434,3893,3894],{"class":436,"line":662},[434,3895,576],{"class":447},[734,3897,3899],{"id":3898},"isr-vercel","ISR (Vercel)",[405,3901,3902],{},"Configure Incremental Static Regeneration for Vercel deployments:",[425,3904,3906],{"className":427,"code":3905,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/isr/**': { isr: true },\n    '/isr-ttl/**': { isr: 60 },\n    '/isr-custom/**': {\n      isr: {\n        expiration: 60,\n        allowQuery: ['q'],\n        group: 1,\n      },\n    },\n  }\n});\n",[409,3907,3908,3920,3924,3934,3938,3950,3961,3968,3973,3982,3992,4002,4006,4010,4014],{"__ignoreMap":5},[434,3909,3910,3912,3914,3916,3918],{"class":436,"line":437},[434,3911,441],{"class":440},[434,3913,1539],{"class":447},[434,3915,451],{"class":440},[434,3917,1544],{"class":454},[434,3919,458],{"class":447},[434,3921,3922],{"class":436,"line":461},[434,3923,465],{"emptyLinePlaceholder":464},[434,3925,3926,3928,3930,3932],{"class":436,"line":468},[434,3927,471],{"class":440},[434,3929,474],{"class":440},[434,3931,1559],{"class":486},[434,3933,1562],{"class":447},[434,3935,3936],{"class":436,"line":499},[434,3937,2809],{"class":447},[434,3939,3940,3943,3946,3948],{"class":436,"line":510},[434,3941,3942],{"class":454},"    '/isr/**'",[434,3944,3945],{"class":447},": { isr: ",[434,3947,1372],{"class":885},[434,3949,2822],{"class":447},[434,3951,3952,3955,3957,3959],{"class":436,"line":573},[434,3953,3954],{"class":454},"    '/isr-ttl/**'",[434,3956,3945],{"class":447},[434,3958,3756],{"class":885},[434,3960,2822],{"class":447},[434,3962,3963,3966],{"class":436,"line":656},[434,3964,3965],{"class":454},"    '/isr-custom/**'",[434,3967,1689],{"class":447},[434,3969,3970],{"class":436,"line":662},[434,3971,3972],{"class":447},"      isr: {\n",[434,3974,3975,3978,3980],{"class":436,"line":1266},[434,3976,3977],{"class":447},"        expiration: ",[434,3979,3756],{"class":885},[434,3981,1681],{"class":447},[434,3983,3984,3987,3990],{"class":436,"line":1276},[434,3985,3986],{"class":447},"        allowQuery: [",[434,3988,3989],{"class":454},"'q'",[434,3991,2308],{"class":447},[434,3993,3994,3997,4000],{"class":436,"line":1725},[434,3995,3996],{"class":447},"        group: ",[434,3998,3999],{"class":885},"1",[434,4001,1681],{"class":447},[434,4003,4004],{"class":436,"line":1733},[434,4005,3518],{"class":447},[434,4007,4008],{"class":436,"line":1743},[434,4009,1722],{"class":447},[434,4011,4012],{"class":436,"line":1748},[434,4013,2561],{"class":447},[434,4015,4016],{"class":436,"line":1754},[434,4017,576],{"class":447},[734,4019,4021],{"id":4020},"route-rules-reference","Route rules reference",[1761,4023,4024,4034],{},[1764,4025,4026],{},[1767,4027,4028,4030,4032],{},[1770,4029,1772],{},[1770,4031,1775],{},[1770,4033,1778],{},[1780,4035,4036,4050,4066,4080,4093,4109,4125,4138,4153,4166],{},[1767,4037,4038,4042,4047],{},[1785,4039,4040],{},[409,4041,3095],{},[1785,4043,4044],{},[409,4045,4046],{},"Record\u003Cstring, string>",[1785,4048,4049],{},"Custom response headers",[1767,4051,4052,4056,4061],{},[1785,4053,4054],{},[409,4055,3282],{},[1785,4057,4058],{},[409,4059,4060],{},"string | { to: string, status?: number }",[1785,4062,4063,4064,680],{},"Redirect to another URL (default status: ",[409,4065,3289],{},[1767,4067,4068,4072,4077],{},[1785,4069,4070],{},[409,4071,3392],{},[1785,4073,4074],{},[409,4075,4076],{},"string | { to: string, ...proxyOptions }",[1785,4078,4079],{},"Proxy requests to another URL",[1767,4081,4082,4086,4090],{},[1785,4083,4084],{},[409,4085,3178],{},[1785,4087,4088],{},[409,4089,1828],{},[1785,4091,4092],{},"Enable permissive CORS headers",[1767,4094,4095,4099,4104],{},[1785,4096,4097],{},[409,4098,2745],{},[1785,4100,4101],{},[409,4102,4103],{},"object | false",[1785,4105,4106,4107,680],{},"Cache options (see ",[414,4108,2753],{"href":69},[1767,4110,4111,4115,4120],{},[1785,4112,4113],{},[409,4114,3660],{},[1785,4116,4117],{},[409,4118,4119],{},"boolean | number",[1785,4121,4122,4123],{},"Shortcut for ",[409,4124,2765],{},[1767,4126,4127,4131,4135],{},[1785,4128,4129],{},[409,4130,3664],{},[1785,4132,4133],{},[409,4134,4119],{},[1785,4136,4137],{},"Shortcut for static caching",[1767,4139,4140,4145,4150],{},[1785,4141,4142],{},[409,4143,4144],{},"basicAuth",[1785,4146,4147],{},[409,4148,4149],{},"{ username, password, realm? } | false",[1785,4151,4152],{},"HTTP Basic Authentication",[1767,4154,4155,4159,4163],{},[1785,4156,4157],{},[409,4158,3825],{},[1785,4160,4161],{},[409,4162,1828],{},[1785,4164,4165],{},"Enable/disable prerendering",[1767,4167,4168,4173,4178],{},[1785,4169,4170],{},[409,4171,4172],{},"isr",[1785,4174,4175],{},[409,4176,4177],{},"boolean | number | object",[1785,4179,4180],{},"Incremental Static Regeneration (Vercel)",[734,4182,4184],{"id":4183},"runtime-route-rules","Runtime route rules",[405,4186,4187,4188,4191],{},"Route rules can be provided through ",[409,4189,4190],{},"runtimeConfig",", allowing overrides via environment variables without rebuilding:",[425,4193,4195],{"className":427,"code":4194,"filename":1530,"language":430,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  runtimeConfig: {\n    nitro: {\n      routeRules: {\n        '/api/**': { headers: { 'x-env': 'production' } },\n      },\n    },\n  },\n});\n",[409,4196,4197,4209,4213,4223,4228,4233,4238,4255,4259,4263,4267],{"__ignoreMap":5},[434,4198,4199,4201,4203,4205,4207],{"class":436,"line":437},[434,4200,441],{"class":440},[434,4202,1539],{"class":447},[434,4204,451],{"class":440},[434,4206,1544],{"class":454},[434,4208,458],{"class":447},[434,4210,4211],{"class":436,"line":461},[434,4212,465],{"emptyLinePlaceholder":464},[434,4214,4215,4217,4219,4221],{"class":436,"line":468},[434,4216,471],{"class":440},[434,4218,474],{"class":440},[434,4220,1559],{"class":486},[434,4222,1562],{"class":447},[434,4224,4225],{"class":436,"line":499},[434,4226,4227],{"class":447},"  runtimeConfig: {\n",[434,4229,4230],{"class":436,"line":510},[434,4231,4232],{"class":447},"    nitro: {\n",[434,4234,4235],{"class":436,"line":573},[434,4236,4237],{"class":447},"      routeRules: {\n",[434,4239,4240,4243,4245,4248,4250,4253],{"class":436,"line":656},[434,4241,4242],{"class":454},"        '/api/**'",[434,4244,2868],{"class":447},[434,4246,4247],{"class":454},"'x-env'",[434,4249,1675],{"class":447},[434,4251,4252],{"class":454},"'production'",[434,4254,2860],{"class":447},[434,4256,4257],{"class":436,"line":662},[434,4258,3518],{"class":447},[434,4260,4261],{"class":436,"line":1266},[434,4262,1722],{"class":447},[434,4264,4265],{"class":436,"line":1276},[434,4266,1751],{"class":447},[434,4268,4269],{"class":436,"line":1725},[434,4270,576],{"class":447},[400,4272,4274],{"id":4273},"config-reference","Config reference",[405,4276,4277],{},"These config options control routing behavior:",[1761,4279,4280,4293],{},[1764,4281,4282],{},[1767,4283,4284,4286,4288,4291],{},[1770,4285,1772],{},[1770,4287,1775],{},[1770,4289,4290],{},"Default",[1770,4292,1778],{},[1780,4294,4295,4314,4336,4355,4374,4393,4413,4432,4450,4469],{},[1767,4296,4297,4302,4306,4311],{},[1785,4298,4299],{},[409,4300,4301],{},"baseURL",[1785,4303,4304],{},[409,4305,1794],{},[1785,4307,4308],{},[409,4309,4310],{},"\"/\"",[1785,4312,4313],{},"Base URL for all routes",[1767,4315,4316,4321,4325,4330],{},[1785,4317,4318],{},[409,4319,4320],{},"apiBaseURL",[1785,4322,4323],{},[409,4324,1794],{},[1785,4326,4327],{},[409,4328,4329],{},"\"/api\"",[1785,4331,4332,4333,4335],{},"Base URL for routes in the ",[409,4334,592],{}," directory",[1767,4337,4338,4343,4347,4352],{},[1785,4339,4340],{},[409,4341,4342],{},"apiDir",[1785,4344,4345],{},[409,4346,1794],{},[1785,4348,4349],{},[409,4350,4351],{},"\"api\"",[1785,4353,4354],{},"Directory name for API routes",[1767,4356,4357,4362,4366,4371],{},[1785,4358,4359],{},[409,4360,4361],{},"routesDir",[1785,4363,4364],{},[409,4365,1794],{},[1785,4367,4368],{},[409,4369,4370],{},"\"routes\"",[1785,4372,4373],{},"Directory name for file-based routes",[1767,4375,4376,4381,4386,4390],{},[1785,4377,4378],{},[409,4379,4380],{},"serverDir",[1785,4382,4383],{},[409,4384,4385],{},"string | false",[1785,4387,4388],{},[409,4389,2993],{},[1785,4391,4392],{},"Server directory for scanning routes, middleware, plugins, etc.",[1767,4394,4395,4400,4405,4410],{},[1785,4396,4397],{},[409,4398,4399],{},"scanDirs",[1785,4401,4402],{},[409,4403,4404],{},"string[]",[1785,4406,4407],{},[409,4408,4409],{},"[]",[1785,4411,4412],{},"Additional directories to scan for routes",[1767,4414,4415,4419,4424,4429],{},[1785,4416,4417],{},[409,4418,1514],{},[1785,4420,4421],{},[409,4422,4423],{},"Record\u003Cstring, string | handler>",[1785,4425,4426],{},[409,4427,4428],{},"{}",[1785,4430,4431],{},"Route-to-handler mapping",[1767,4433,4434,4438,4443,4447],{},[1785,4435,4436],{},[409,4437,1881],{},[1785,4439,4440],{},[409,4441,4442],{},"NitroEventHandler[]",[1785,4444,4445],{},[409,4446,4409],{},[1785,4448,4449],{},"Programmatic handler registration (mainly for middleware)",[1767,4451,4452,4457,4462,4466],{},[1785,4453,4454],{},[409,4455,4456],{},"routeRules",[1785,4458,4459],{},[409,4460,4461],{},"Record\u003Cstring, NitroRouteConfig>",[1785,4463,4464],{},[409,4465,4428],{},[1785,4467,4468],{},"Route rules for matching patterns",[1767,4470,4471,4475,4479,4483],{},[1785,4472,4473],{},[409,4474,1525],{},[1785,4476,4477],{},[409,4478,4404],{},[1785,4480,4481],{},[409,4482,4409],{},[1785,4484,4485],{},"Glob patterns to ignore during file scanning",[4487,4488,4489],"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 .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .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}",{"title":5,"searchDepth":461,"depth":461,"links":4491},[4492,4493,4501,4507,4514,4515,4516,4529],{"id":402,"depth":461,"text":403},{"id":579,"depth":461,"text":580,"children":4494},[4495,4496,4497,4498,4499,4500],{"id":736,"depth":468,"text":737},{"id":806,"depth":468,"text":807},{"id":1140,"depth":468,"text":1141},{"id":1381,"depth":468,"text":1382},{"id":1455,"depth":468,"text":1456},{"id":1518,"depth":468,"text":1519},{"id":1612,"depth":461,"text":1613,"children":4502},[4503,4505],{"id":1622,"depth":468,"text":4504},"routes config",{"id":1878,"depth":468,"text":4506},"handlers config",{"id":2042,"depth":461,"text":285,"children":4508},[4509,4510,4511,4512,4513],{"id":2148,"depth":468,"text":2149},{"id":2238,"depth":468,"text":2239},{"id":2379,"depth":468,"text":2380},{"id":2470,"depth":468,"text":2471},{"id":2568,"depth":468,"text":2569},{"id":2670,"depth":461,"text":2671},{"id":2702,"depth":461,"text":2703},{"id":2726,"depth":461,"text":2727,"children":4517},[4518,4519,4520,4521,4522,4523,4524,4525,4526,4527,4528],{"id":2983,"depth":468,"text":2984},{"id":3095,"depth":468,"text":3096},{"id":3178,"depth":468,"text":3179},{"id":3282,"depth":468,"text":3283},{"id":3392,"depth":468,"text":3393},{"id":3535,"depth":468,"text":3536},{"id":3651,"depth":468,"text":3652},{"id":3825,"depth":468,"text":3826},{"id":3898,"depth":468,"text":3899},{"id":4020,"depth":468,"text":4021},{"id":4183,"depth":468,"text":4184},{"id":4273,"depth":461,"text":4274},"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.",{"icon":26},{"icon":26},{"title":23,"description":4530},"n0IcGT6MIMF2U_9AWd9ftZjLNYnGy1hCk60aNxJt4gY",[4536,4538],{"title":18,"path":19,"stem":20,"description":4537,"icon":21,"children":-1},"Use a renderer to handle all unmatched routes with custom HTML or a templating system.",{"title":28,"path":29,"stem":30,"description":5,"icon":31,"children":-1},1775834858583]