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