[{"data":1,"prerenderedAt":2100},["ShallowReactive",2],{"navigation":3,"-docs-routing":224,"-docs-routing-surround":2096},[4,83,208,214,221],{"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],{"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},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":209,"path":210,"stem":211,"children":212,"icon":36},"Config","/config","3.config/0.index",[213],{"title":209,"path":210,"stem":211,"icon":36},{"title":215,"path":216,"stem":217,"children":218,"icon":220},"Examples","/examples","4.examples/0.index",[219],{"title":215,"path":216,"stem":217,"icon":220},"i-lucide-folder-code",{"title":5,"path":222,"stem":223},"/","index",{"id":225,"title":23,"body":226,"description":2091,"extension":1312,"meta":2092,"navigation":2093,"path":24,"seo":2094,"stem":25,"__hash__":2095},"content/1.docs/5.routing.md",{"type":227,"value":228,"toc":2072,"icon":26},"minimark",[229,236,241,257,413,417,434,442,450,453,502,507,518,521,563,569,574,583,586,640,644,648,671,754,761,771,775,787,873,877,887,960,965,974,978,989,1183,1187,1190,1196,1257,1261,1280,1290,1294,1297,1302,1308,1344,1348,1351,1415,1426,1434,1438,1445,1451,1574,1581,1585,1588,1612,1615,1639,1672,1676,1679,1682,1685,1770,1774,1783,1794,1803,1807,1817,1827,1831,1834,1843,1858,1869,1876,2068],[230,231,232],"warning",{},[233,234,235],"p",{},"Nitro v3 Alpha docs are a work in progress — expect updates, rough edges, and occasional inaccuracies.",[237,238,240],"h2",{"id":239},"request-handler","Request handler",[233,242,243,244,248,249,256],{},"Nitro request handler is a function accepting an ",[245,246,247],"code",{},"event"," object, which is a ",[250,251,255],"a",{"href":252,"rel":253},"https://h3.dev/guide/api/h3event#h3event-properties",[254],"nofollow","H3Event"," object.",[258,259,260,350],"code-group",{},[261,262,267],"pre",{"className":263,"code":264,"filename":265,"language":266,"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",[245,268,269,295,302,333,344],{"__ignoreMap":5},[270,271,274,278,281,285,288,292],"span",{"class":272,"line":273},"line",1,[270,275,277],{"class":276},"so5gQ","import",[270,279,280],{"class":276}," type",[270,282,284],{"class":283},"slsVL"," { H3Event } ",[270,286,287],{"class":276},"from",[270,289,291],{"class":290},"sfrk1"," \"nitro/h3\"",[270,293,294],{"class":283},";\n",[270,296,298],{"class":272,"line":297},2,[270,299,301],{"emptyLinePlaceholder":300},true,"\n",[270,303,305,308,311,314,317,320,324,327,330],{"class":272,"line":304},3,[270,306,307],{"class":276},"export",[270,309,310],{"class":276}," default",[270,312,313],{"class":283}," (",[270,315,247],{"class":316},"sQHwn",[270,318,319],{"class":276},":",[270,321,323],{"class":322},"shcOC"," H3Event",[270,325,326],{"class":283},") ",[270,328,329],{"class":276},"=>",[270,331,332],{"class":283}," {\n",[270,334,336,339,342],{"class":272,"line":335},4,[270,337,338],{"class":276},"  return",[270,340,341],{"class":290}," \"world\"",[270,343,294],{"class":283},[270,345,347],{"class":272,"line":346},5,[270,348,349],{"class":283},"}\n",[261,351,354],{"className":263,"code":352,"filename":353,"language":266,"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",[245,355,356,369,373,379,399,407],{"__ignoreMap":5},[270,357,358,360,363,365,367],{"class":272,"line":273},[270,359,277],{"class":276},[270,361,362],{"class":283}," { defineHandler } ",[270,364,287],{"class":276},[270,366,291],{"class":290},[270,368,294],{"class":283},[270,370,371],{"class":272,"line":297},[270,372,301],{"emptyLinePlaceholder":300},[270,374,375],{"class":272,"line":304},[270,376,378],{"class":377},"sCsY4","// For better type inference\n",[270,380,381,383,385,388,391,393,395,397],{"class":272,"line":335},[270,382,307],{"class":276},[270,384,310],{"class":276},[270,386,387],{"class":322}," defineHandler",[270,389,390],{"class":283},"((",[270,392,247],{"class":316},[270,394,326],{"class":283},[270,396,329],{"class":276},[270,398,332],{"class":283},[270,400,401,403,405],{"class":272,"line":346},[270,402,338],{"class":276},[270,404,341],{"class":290},[270,406,294],{"class":283},[270,408,410],{"class":272,"line":409},6,[270,411,412],{"class":283},"});\n",[237,414,416],{"id":415},"filesystem-routing","Filesystem routing",[233,418,419,420,425,426,429,430,433],{},"Nitro supports file-based routing for your API routes (files are automatically mapped to ",[250,421,424],{"href":422,"rel":423},"https://h3.dev/guide/basics/routing",[254],"h3 routes","). Defining a route is as simple as creating a file inside the ",[245,427,428],{},"api/"," or ",[245,431,432],{},"routes/"," directory.",[233,435,436,437,441],{},"You can only define one handler per files and you can ",[250,438,440],{"href":439},"#specific-request-method","append the HTTP method"," to the filename to define a specific request method.",[261,443,448],{"className":444,"code":446,"language":447},[445],"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",[245,449,446],{"__ignoreMap":5},[233,451,452],{},"You can nest routes by creating subdirectories.",[261,454,458],{"className":455,"code":456,"language":457,"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",[245,459,460,465,470,475,480,485,490,496],{"__ignoreMap":5},[270,461,462],{"class":272,"line":273},[270,463,464],{},"routes/\n",[270,466,467],{"class":272,"line":297},[270,468,469],{},"  api/\n",[270,471,472],{"class":272,"line":304},[270,473,474],{},"    [org]/\n",[270,476,477],{"class":272,"line":335},[270,478,479],{},"      [repo]/\n",[270,481,482],{"class":272,"line":346},[270,483,484],{},"        index.ts   \u003C-- /api/:org/:repo\n",[270,486,487],{"class":272,"line":409},[270,488,489],{},"        issues.ts  \u003C-- /api/:org/:repo/issues\n",[270,491,493],{"class":272,"line":492},7,[270,494,495],{},"      index.ts     \u003C-- /api/:org\n",[270,497,499],{"class":272,"line":498},8,[270,500,501],{},"package.json\n",[503,504,506],"h4",{"id":505},"route-groups","Route Groups",[233,508,509,510,513,514,517],{},"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 ",[245,511,512],{},"("," and ",[245,515,516],{},")",".",[233,519,520],{},"For example:",[261,522,524],{"className":455,"code":523,"language":457,"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",[245,525,526,530,534,539,544,549,554,559],{"__ignoreMap":5},[270,527,528],{"class":272,"line":273},[270,529,464],{},[270,531,532],{"class":272,"line":297},[270,533,469],{},[270,535,536],{"class":272,"line":304},[270,537,538],{},"    (admin)/\n",[270,540,541],{"class":272,"line":335},[270,542,543],{},"      users.ts   \u003C-- /api/users\n",[270,545,546],{"class":272,"line":346},[270,547,548],{},"      reports.ts \u003C-- /api/reports\n",[270,550,551],{"class":272,"line":409},[270,552,553],{},"    (public)/\n",[270,555,556],{"class":272,"line":492},[270,557,558],{},"      index.ts   \u003C-- /api\n",[270,560,561],{"class":272,"line":498},[270,562,501],{},[564,565,566],"note",{},[233,567,568],{}," The route groups are not part of the route definition and are only used for organization purposes.",[570,571,573],"h3",{"id":572},"static-routes","Static routes",[233,575,576,577,429,579,582],{},"First, create a file in ",[245,578,432],{},[245,580,581],{},"routes/api/"," directory. The filename will be the route path.",[233,584,585],{},"Then, export a fetch-compatible function:",[261,587,590],{"className":263,"code":588,"filename":589,"language":266,"meta":5,"style":5},"import { defineHandler } from \"nitro/h3\";\n\nexport default defineHandler(() => {\n  return { hello: \"API\" };\n});\n","routes/api/test.ts",[245,591,592,604,608,623,636],{"__ignoreMap":5},[270,593,594,596,598,600,602],{"class":272,"line":273},[270,595,277],{"class":276},[270,597,362],{"class":283},[270,599,287],{"class":276},[270,601,291],{"class":290},[270,603,294],{"class":283},[270,605,606],{"class":272,"line":297},[270,607,301],{"emptyLinePlaceholder":300},[270,609,610,612,614,616,619,621],{"class":272,"line":304},[270,611,307],{"class":276},[270,613,310],{"class":276},[270,615,387],{"class":322},[270,617,618],{"class":283},"(() ",[270,620,329],{"class":276},[270,622,332],{"class":283},[270,624,625,627,630,633],{"class":272,"line":335},[270,626,338],{"class":276},[270,628,629],{"class":283}," { hello: ",[270,631,632],{"class":290},"\"API\"",[270,634,635],{"class":283}," };\n",[270,637,638],{"class":272,"line":346},[270,639,412],{"class":283},[570,641,643],{"id":642},"dynamic-routes","Dynamic routes",[503,645,647],{"id":646},"single-param","Single param",[233,649,650,651,654,655,658,659,662,663,670],{},"To define a route with params, use the ",[245,652,653],{},"[\u003Cparam>]"," syntax where ",[245,656,657],{},"\u003Cparam>"," is the name of the param. The param will be available in the ",[245,660,661],{},"event.context.params"," object or using the ",[250,664,667],{"href":665,"rel":666},"https://h3.dev/utils/request#getrouterparamevent-name-opts-decode",[254],[245,668,669],{},"getRouterParam"," utility.",[261,672,675],{"className":263,"code":673,"filename":674,"language":266,"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",[245,676,677,689,693,711,732,736,750],{"__ignoreMap":5},[270,678,679,681,683,685,687],{"class":272,"line":273},[270,680,277],{"class":276},[270,682,362],{"class":283},[270,684,287],{"class":276},[270,686,291],{"class":290},[270,688,294],{"class":283},[270,690,691],{"class":272,"line":297},[270,692,301],{"emptyLinePlaceholder":300},[270,694,695,697,699,701,703,705,707,709],{"class":272,"line":304},[270,696,307],{"class":276},[270,698,310],{"class":276},[270,700,387],{"class":322},[270,702,390],{"class":283},[270,704,247],{"class":316},[270,706,326],{"class":283},[270,708,329],{"class":276},[270,710,332],{"class":283},[270,712,713,716,719,723,726,729],{"class":272,"line":335},[270,714,715],{"class":276},"  const",[270,717,718],{"class":283}," { ",[270,720,722],{"class":721},"suiK_","name",[270,724,725],{"class":283}," } ",[270,727,728],{"class":276},"=",[270,730,731],{"class":283}," event.context.params;\n",[270,733,734],{"class":272,"line":346},[270,735,301],{"emptyLinePlaceholder":300},[270,737,738,740,743,745,748],{"class":272,"line":409},[270,739,338],{"class":276},[270,741,742],{"class":290}," `Hello ${",[270,744,722],{"class":283},[270,746,747],{"class":290},"}!`",[270,749,294],{"class":283},[270,751,752],{"class":272,"line":492},[270,753,412],{"class":283},[233,755,756,757,760],{},"Call the route with the param ",[245,758,759],{},"/hello/nitro",", you will get:",[261,762,765],{"className":455,"code":763,"filename":764,"language":457,"meta":5,"style":5},"Hello nitro!\n","Response",[245,766,767],{"__ignoreMap":5},[270,768,769],{"class":272,"line":273},[270,770,763],{},[503,772,774],{"id":773},"multiple-params","Multiple params",[233,776,777,778,781,782,786],{},"You can define multiple params in a route using ",[245,779,780],{},"[\u003Cparam1>]/[\u003Cparam2>]"," syntax where each param is a folder. You ",[783,784,785],"strong",{},"cannot"," define multiple params in a single filename of folder.",[261,788,791],{"className":263,"code":789,"filename":790,"language":266,"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",[245,792,793,805,809,827,847,851,869],{"__ignoreMap":5},[270,794,795,797,799,801,803],{"class":272,"line":273},[270,796,277],{"class":276},[270,798,362],{"class":283},[270,800,287],{"class":276},[270,802,291],{"class":290},[270,804,294],{"class":283},[270,806,807],{"class":272,"line":297},[270,808,301],{"emptyLinePlaceholder":300},[270,810,811,813,815,817,819,821,823,825],{"class":272,"line":304},[270,812,307],{"class":276},[270,814,310],{"class":276},[270,816,387],{"class":322},[270,818,390],{"class":283},[270,820,247],{"class":316},[270,822,326],{"class":283},[270,824,329],{"class":276},[270,826,332],{"class":283},[270,828,829,831,833,835,838,841,843,845],{"class":272,"line":335},[270,830,715],{"class":276},[270,832,718],{"class":283},[270,834,722],{"class":721},[270,836,837],{"class":283},", ",[270,839,840],{"class":721},"age",[270,842,725],{"class":283},[270,844,728],{"class":276},[270,846,731],{"class":283},[270,848,849],{"class":272,"line":346},[270,850,301],{"emptyLinePlaceholder":300},[270,852,853,855,857,859,862,864,867],{"class":272,"line":409},[270,854,338],{"class":276},[270,856,742],{"class":290},[270,858,722],{"class":283},[270,860,861],{"class":290},"}! You are ${",[270,863,840],{"class":283},[270,865,866],{"class":290},"} years old.`",[270,868,294],{"class":283},[270,870,871],{"class":272,"line":492},[270,872,412],{"class":283},[503,874,876],{"id":875},"catch-all-params","Catch-all params",[233,878,879,880,883,884,886],{},"You can capture all the remaining parts of a URL using ",[245,881,882],{},"[...\u003Cparam>]"," syntax. This will include the ",[245,885,222],{}," in the param.",[261,888,890],{"className":263,"code":673,"filename":889,"language":266,"meta":5,"style":5},"routes/hello/[...name].ts",[245,891,892,904,908,926,940,944,956],{"__ignoreMap":5},[270,893,894,896,898,900,902],{"class":272,"line":273},[270,895,277],{"class":276},[270,897,362],{"class":283},[270,899,287],{"class":276},[270,901,291],{"class":290},[270,903,294],{"class":283},[270,905,906],{"class":272,"line":297},[270,907,301],{"emptyLinePlaceholder":300},[270,909,910,912,914,916,918,920,922,924],{"class":272,"line":304},[270,911,307],{"class":276},[270,913,310],{"class":276},[270,915,387],{"class":322},[270,917,390],{"class":283},[270,919,247],{"class":316},[270,921,326],{"class":283},[270,923,329],{"class":276},[270,925,332],{"class":283},[270,927,928,930,932,934,936,938],{"class":272,"line":335},[270,929,715],{"class":276},[270,931,718],{"class":283},[270,933,722],{"class":721},[270,935,725],{"class":283},[270,937,728],{"class":276},[270,939,731],{"class":283},[270,941,942],{"class":272,"line":346},[270,943,301],{"emptyLinePlaceholder":300},[270,945,946,948,950,952,954],{"class":272,"line":409},[270,947,338],{"class":276},[270,949,742],{"class":290},[270,951,722],{"class":283},[270,953,747],{"class":290},[270,955,294],{"class":283},[270,957,958],{"class":272,"line":492},[270,959,412],{"class":283},[233,961,756,962,760],{},[245,963,964],{},"/hello/nitro/is/hot",[261,966,968],{"className":455,"code":967,"filename":764,"language":457,"meta":5,"style":5},"Hello nitro/is/hot!\n",[245,969,970],{"__ignoreMap":5},[270,971,972],{"class":272,"line":273},[270,973,967],{},[570,975,977],{"id":976},"specific-request-method","Specific request method",[233,979,980,981,984,985,988],{},"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 ",[245,982,983],{},"hello.get.ts"," will only match for ",[245,986,987],{},"GET"," requests. You can use any HTTP method you want.",[258,990,991,1085],{},[261,992,996],{"className":993,"code":994,"filename":987,"language":995,"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",[245,997,998,1003,1015,1019,1042,1057,1061,1066,1070,1080],{"__ignoreMap":5},[270,999,1000],{"class":272,"line":273},[270,1001,1002],{"class":377},"// routes/users/[id].get.ts\n",[270,1004,1005,1007,1009,1011,1013],{"class":272,"line":297},[270,1006,277],{"class":276},[270,1008,362],{"class":283},[270,1010,287],{"class":276},[270,1012,291],{"class":290},[270,1014,294],{"class":283},[270,1016,1017],{"class":272,"line":304},[270,1018,301],{"emptyLinePlaceholder":300},[270,1020,1021,1023,1025,1027,1029,1032,1034,1036,1038,1040],{"class":272,"line":335},[270,1022,307],{"class":276},[270,1024,310],{"class":276},[270,1026,387],{"class":322},[270,1028,512],{"class":283},[270,1030,1031],{"class":276},"async",[270,1033,313],{"class":283},[270,1035,247],{"class":316},[270,1037,326],{"class":283},[270,1039,329],{"class":276},[270,1041,332],{"class":283},[270,1043,1044,1046,1048,1051,1053,1055],{"class":272,"line":346},[270,1045,715],{"class":276},[270,1047,718],{"class":283},[270,1049,1050],{"class":721},"id",[270,1052,725],{"class":283},[270,1054,728],{"class":276},[270,1056,731],{"class":283},[270,1058,1059],{"class":272,"line":409},[270,1060,301],{"emptyLinePlaceholder":300},[270,1062,1063],{"class":272,"line":492},[270,1064,1065],{"class":377},"  // Do something with id\n",[270,1067,1068],{"class":272,"line":498},[270,1069,301],{"emptyLinePlaceholder":300},[270,1071,1073,1075,1078],{"class":272,"line":1072},9,[270,1074,338],{"class":276},[270,1076,1077],{"class":290}," `User profile!`",[270,1079,294],{"class":283},[270,1081,1083],{"class":272,"line":1082},10,[270,1084,412],{"class":283},[261,1086,1089],{"className":993,"code":1087,"filename":1088,"language":995,"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",[245,1090,1091,1096,1109,1113,1135,1154,1158,1163,1167,1179],{"__ignoreMap":5},[270,1092,1093],{"class":272,"line":273},[270,1094,1095],{"class":377},"// routes/users.post.ts\n",[270,1097,1098,1100,1103,1105,1107],{"class":272,"line":297},[270,1099,277],{"class":276},[270,1101,1102],{"class":283}," { defineHandler, readBody } ",[270,1104,287],{"class":276},[270,1106,291],{"class":290},[270,1108,294],{"class":283},[270,1110,1111],{"class":272,"line":304},[270,1112,301],{"emptyLinePlaceholder":300},[270,1114,1115,1117,1119,1121,1123,1125,1127,1129,1131,1133],{"class":272,"line":335},[270,1116,307],{"class":276},[270,1118,310],{"class":276},[270,1120,387],{"class":322},[270,1122,512],{"class":283},[270,1124,1031],{"class":276},[270,1126,313],{"class":283},[270,1128,247],{"class":316},[270,1130,326],{"class":283},[270,1132,329],{"class":276},[270,1134,332],{"class":283},[270,1136,1137,1139,1142,1145,1148,1151],{"class":272,"line":346},[270,1138,715],{"class":276},[270,1140,1141],{"class":721}," body",[270,1143,1144],{"class":276}," =",[270,1146,1147],{"class":276}," await",[270,1149,1150],{"class":322}," readBody",[270,1152,1153],{"class":283},"(event);\n",[270,1155,1156],{"class":272,"line":409},[270,1157,301],{"emptyLinePlaceholder":300},[270,1159,1160],{"class":272,"line":492},[270,1161,1162],{"class":377},"  // Do something with body like saving it to a database\n",[270,1164,1165],{"class":272,"line":498},[270,1166,301],{"emptyLinePlaceholder":300},[270,1168,1169,1171,1174,1177],{"class":272,"line":1072},[270,1170,338],{"class":276},[270,1172,1173],{"class":283}," { updated: ",[270,1175,1176],{"class":721},"true",[270,1178,635],{"class":283},[270,1180,1181],{"class":272,"line":1082},[270,1182,412],{"class":283},[570,1184,1186],{"id":1185},"catch-all-route","Catch-all route",[233,1188,1189],{},"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.",[233,1191,1192,1193,517],{},"To create a catch-all route, create a file named ",[245,1194,1195],{},"[...].ts",[261,1197,1200],{"className":263,"code":1198,"filename":1199,"language":266,"meta":5,"style":5},"import { defineHandler } from \"nitro/h3\";\n\nexport default defineHandler((event) => {\n  return `Hello ${event.url}!`;\n});\n","routes/[...].ts",[245,1201,1202,1214,1218,1236,1253],{"__ignoreMap":5},[270,1203,1204,1206,1208,1210,1212],{"class":272,"line":273},[270,1205,277],{"class":276},[270,1207,362],{"class":283},[270,1209,287],{"class":276},[270,1211,291],{"class":290},[270,1213,294],{"class":283},[270,1215,1216],{"class":272,"line":297},[270,1217,301],{"emptyLinePlaceholder":300},[270,1219,1220,1222,1224,1226,1228,1230,1232,1234],{"class":272,"line":304},[270,1221,307],{"class":276},[270,1223,310],{"class":276},[270,1225,387],{"class":322},[270,1227,390],{"class":283},[270,1229,247],{"class":316},[270,1231,326],{"class":283},[270,1233,329],{"class":276},[270,1235,332],{"class":283},[270,1237,1238,1240,1242,1244,1246,1249,1251],{"class":272,"line":335},[270,1239,338],{"class":276},[270,1241,742],{"class":290},[270,1243,247],{"class":283},[270,1245,517],{"class":290},[270,1247,1248],{"class":283},"url",[270,1250,747],{"class":290},[270,1252,294],{"class":283},[270,1254,1255],{"class":272,"line":346},[270,1256,412],{"class":283},[570,1258,1260],{"id":1259},"environment-specific-handlers","Environment specific handlers",[233,1262,1263,1264,837,1267,429,1270,1273,1274,429,1277,517],{},"You can specify for a route that will only be included in specific builds by adding a ",[245,1265,1266],{},".dev",[245,1268,1269],{},".prod",[245,1271,1272],{},".prerender"," suffix to the file name, for example: ",[245,1275,1276],{},"routes/test.get.dev.ts",[245,1278,1279],{},"routes/test.get.prod.ts",[1281,1282,1283],"tip",{},[233,1284,1285,1286,1289],{},"\nYou can specify multiple environments or specify a preset name as environment using programmatic registration of routes via ",[245,1287,1288],{},"handlers[]"," config.",[237,1291,1293],{"id":1292},"middleware","Middleware",[233,1295,1296],{},"Nitro route middleware can hook into the request lifecycle.",[1281,1298,1299],{},[233,1300,1301],{},"A middleware can modify the request before it is processed, not after.",[233,1303,1304,1305,433],{},"Middleware are auto-registered within the ",[245,1306,1307],{},"middleware/",[261,1309,1313],{"className":1310,"code":1311,"language":1312,"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",[245,1314,1315,1320,1325,1330,1335,1339],{"__ignoreMap":5},[270,1316,1317],{"class":272,"line":273},[270,1318,1319],{"class":283},"middleware/\n",[270,1321,1322],{"class":272,"line":297},[270,1323,1324],{"class":283},"  auth.ts\n",[270,1326,1327],{"class":272,"line":304},[270,1328,1329],{"class":283},"  logger.ts\n",[270,1331,1332],{"class":272,"line":335},[270,1333,1334],{"class":283},"  ...\n",[270,1336,1337],{"class":272,"line":346},[270,1338,464],{"class":283},[270,1340,1341],{"class":272,"line":409},[270,1342,1343],{"class":283},"  hello.ts\n",[570,1345,1347],{"id":1346},"simple-middleware","Simple middleware",[233,1349,1350],{},"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.",[261,1352,1355],{"className":263,"code":1353,"filename":1354,"language":266,"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",[245,1356,1357,1369,1373,1391,1396,1411],{"__ignoreMap":5},[270,1358,1359,1361,1363,1365,1367],{"class":272,"line":273},[270,1360,277],{"class":276},[270,1362,362],{"class":283},[270,1364,287],{"class":276},[270,1366,291],{"class":290},[270,1368,294],{"class":283},[270,1370,1371],{"class":272,"line":297},[270,1372,301],{"emptyLinePlaceholder":300},[270,1374,1375,1377,1379,1381,1383,1385,1387,1389],{"class":272,"line":304},[270,1376,307],{"class":276},[270,1378,310],{"class":276},[270,1380,387],{"class":322},[270,1382,390],{"class":283},[270,1384,247],{"class":316},[270,1386,326],{"class":283},[270,1388,329],{"class":276},[270,1390,332],{"class":283},[270,1392,1393],{"class":272,"line":335},[270,1394,1395],{"class":377},"  // Extends or modify the event\n",[270,1397,1398,1401,1403,1406,1409],{"class":272,"line":346},[270,1399,1400],{"class":283},"  event.context.user ",[270,1402,728],{"class":276},[270,1404,1405],{"class":283}," { name: ",[270,1407,1408],{"class":290},"\"Nitro\"",[270,1410,635],{"class":283},[270,1412,1413],{"class":272,"line":409},[270,1414,412],{"class":283},[233,1416,1417,1418,1420,1421,517],{},"Middleware in ",[245,1419,1307],{}," directory are automatically registered for all routes. If you want to register a middleware for a specific route, see ",[250,1422,1425],{"href":1423,"rel":1424},"https://h3.dev/guide/basics/handler#object-syntax",[254],"Object Syntax Event Handler",[564,1427,1428],{},[233,1429,1430,1431],{},"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 ",[783,1432,1433],{},"this is not recommended to do!",[570,1435,1437],{"id":1436},"route-meta","Route Meta",[233,1439,1440,1441,1444],{},"You can define route handler meta at build-time using ",[245,1442,1443],{},"defineRouteMeta"," macro in the event handler files.",[1446,1447,1448],"important",{},[233,1449,1450],{},"\n🚧 This feature is currently experimental.",[261,1452,1454],{"className":263,"code":1453,"filename":589,"language":266,"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",[245,1455,1456,1470,1482,1486,1493,1498,1509,1520,1541,1546,1550,1555],{"__ignoreMap":5},[270,1457,1458,1460,1463,1465,1468],{"class":272,"line":273},[270,1459,277],{"class":276},[270,1461,1462],{"class":283}," { defineRouteMeta } ",[270,1464,287],{"class":276},[270,1466,1467],{"class":290}," \"nitro\"",[270,1469,294],{"class":283},[270,1471,1472,1474,1476,1478,1480],{"class":272,"line":297},[270,1473,277],{"class":276},[270,1475,362],{"class":283},[270,1477,287],{"class":276},[270,1479,291],{"class":290},[270,1481,294],{"class":283},[270,1483,1484],{"class":272,"line":304},[270,1485,301],{"emptyLinePlaceholder":300},[270,1487,1488,1490],{"class":272,"line":335},[270,1489,1443],{"class":322},[270,1491,1492],{"class":283},"({\n",[270,1494,1495],{"class":272,"line":346},[270,1496,1497],{"class":283},"  openAPI: {\n",[270,1499,1500,1503,1506],{"class":272,"line":409},[270,1501,1502],{"class":283},"    tags: [",[270,1504,1505],{"class":290},"\"test\"",[270,1507,1508],{"class":283},"],\n",[270,1510,1511,1514,1517],{"class":272,"line":492},[270,1512,1513],{"class":283},"    description: ",[270,1515,1516],{"class":290},"\"Test route description\"",[270,1518,1519],{"class":283},",\n",[270,1521,1522,1525,1528,1531,1533,1536,1538],{"class":272,"line":498},[270,1523,1524],{"class":283},"    parameters: [{ in: ",[270,1526,1527],{"class":290},"\"query\"",[270,1529,1530],{"class":283},", name: ",[270,1532,1505],{"class":290},[270,1534,1535],{"class":283},", required: ",[270,1537,1176],{"class":721},[270,1539,1540],{"class":283}," }],\n",[270,1542,1543],{"class":272,"line":1072},[270,1544,1545],{"class":283},"  },\n",[270,1547,1548],{"class":272,"line":1082},[270,1549,412],{"class":283},[270,1551,1553],{"class":272,"line":1552},11,[270,1554,301],{"emptyLinePlaceholder":300},[270,1556,1558,1560,1562,1564,1566,1568,1571],{"class":272,"line":1557},12,[270,1559,307],{"class":276},[270,1561,310],{"class":276},[270,1563,387],{"class":322},[270,1565,618],{"class":283},[270,1567,329],{"class":276},[270,1569,1570],{"class":290}," \"OK\"",[270,1572,1573],{"class":283},");\n",[1575,1576,1578],"read-more",{"to":1577},"https://swagger.io/specification/v3/",[233,1579,1580],{},"This feature is currently usable to specify OpenAPI meta. See swagger specification for available OpenAPI options.",[570,1582,1584],{"id":1583},"execution-order","Execution order",[233,1586,1587],{},"Middleware are executed in directory listing order.",[261,1589,1591],{"className":1310,"code":1590,"language":1312,"meta":5,"style":5},"middleware/\n  auth.ts \u003C-- First\n  logger.ts \u003C-- Second\n  ... \u003C-- Third\n",[245,1592,1593,1597,1602,1607],{"__ignoreMap":5},[270,1594,1595],{"class":272,"line":273},[270,1596,1319],{"class":283},[270,1598,1599],{"class":272,"line":297},[270,1600,1601],{"class":283},"  auth.ts \u003C-- First\n",[270,1603,1604],{"class":272,"line":304},[270,1605,1606],{"class":283},"  logger.ts \u003C-- Second\n",[270,1608,1609],{"class":272,"line":335},[270,1610,1611],{"class":283},"  ... \u003C-- Third\n",[233,1613,1614],{},"Prefix middleware with a number to control their execution order.",[261,1616,1618],{"className":1310,"code":1617,"language":1312,"meta":5,"style":5},"middleware/\n  1.logger.ts \u003C-- First\n  2.auth.ts \u003C-- Second\n  3.... \u003C-- Third\n",[245,1619,1620,1624,1629,1634],{"__ignoreMap":5},[270,1621,1622],{"class":272,"line":273},[270,1623,1319],{"class":283},[270,1625,1626],{"class":272,"line":297},[270,1627,1628],{"class":283},"  1.logger.ts \u003C-- First\n",[270,1630,1631],{"class":272,"line":304},[270,1632,1633],{"class":283},"  2.auth.ts \u003C-- Second\n",[270,1635,1636],{"class":272,"line":335},[270,1637,1638],{"class":283},"  3.... \u003C-- Third\n",[564,1640,1641],{},[233,1642,1643,1644,837,1647,513,1650,1653,1654,1656,1657,1659,1660,1663,1664,1667,1668,1671],{},"Remember that file names are sorted as strings, thus for example if you have 3 files ",[245,1645,1646],{},"1.filename.ts",[245,1648,1649],{},"2.filename.ts",[245,1651,1652],{},"10.filename.ts",", the ",[245,1655,1652],{}," will come after the ",[245,1658,1646],{},". To avoid this, prefix ",[245,1661,1662],{},"1-9"," with a ",[245,1665,1666],{},"0"," like ",[245,1669,1670],{},"01",", if you have more than 10 middleware in the same directory.",[570,1673,1675],{"id":1674},"request-filtering","Request filtering",[233,1677,1678],{},"Middleware are executed on every request.",[233,1680,1681],{},"Apply custom logic to scope them to specific conditions.",[233,1683,1684],{},"For example, you can use the URL to apply a middleware to a specific route:",[261,1686,1688],{"className":263,"code":1687,"filename":1354,"language":266,"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",[245,1689,1690,1702,1706,1724,1729,1748,1761,1766],{"__ignoreMap":5},[270,1691,1692,1694,1696,1698,1700],{"class":272,"line":273},[270,1693,277],{"class":276},[270,1695,362],{"class":283},[270,1697,287],{"class":276},[270,1699,291],{"class":290},[270,1701,294],{"class":283},[270,1703,1704],{"class":272,"line":297},[270,1705,301],{"emptyLinePlaceholder":300},[270,1707,1708,1710,1712,1714,1716,1718,1720,1722],{"class":272,"line":304},[270,1709,307],{"class":276},[270,1711,310],{"class":276},[270,1713,387],{"class":322},[270,1715,390],{"class":283},[270,1717,247],{"class":316},[270,1719,326],{"class":283},[270,1721,329],{"class":276},[270,1723,332],{"class":283},[270,1725,1726],{"class":272,"line":335},[270,1727,1728],{"class":377},"  // Will only execute for /auth route\n",[270,1730,1731,1734,1737,1740,1742,1745],{"class":272,"line":346},[270,1732,1733],{"class":276},"  if",[270,1735,1736],{"class":283}," (event.url.pathname.",[270,1738,1739],{"class":322},"startsWith",[270,1741,512],{"class":283},[270,1743,1744],{"class":290},"'/auth'",[270,1746,1747],{"class":283},")) {\n",[270,1749,1750,1753,1755,1757,1759],{"class":272,"line":409},[270,1751,1752],{"class":283},"    event.context.user ",[270,1754,728],{"class":276},[270,1756,1405],{"class":283},[270,1758,1408],{"class":290},[270,1760,635],{"class":283},[270,1762,1763],{"class":272,"line":492},[270,1764,1765],{"class":283},"  }\n",[270,1767,1768],{"class":272,"line":498},[270,1769,412],{"class":283},[237,1771,1773],{"id":1772},"error-handling","Error handling",[233,1775,1776,1777,1782],{},"You can use the ",[250,1778,1781],{"href":1779,"rel":1780},"https://h3.dev/guide/basics/error",[254],"utilities available in H3"," to handle errors in both routes and middlewares.",[233,1784,1785,1786,1789,1790,1793],{},"The way errors are sent back to the client depends on the environment. In development, requests with an ",[245,1787,1788],{},"Accept"," header of ",[245,1791,1792],{},"text/html"," (such as browsers) will receive a HTML error page. In production, errors are always sent in JSON.",[233,1795,1796,1797,429,1799,1802],{},"This behaviour can be overridden by some request properties (e.g.: ",[245,1798,1788],{},[245,1800,1801],{},"User-Agent"," headers).",[237,1804,1806],{"id":1805},"code-splitting","Code splitting",[233,1808,1809,1810,1813,1814,517],{},"Nitro creates a separate chunk for each route handler. Chunks load on-demand when first requested, so ",[245,1811,1812],{},"/api/users"," doesn't load code for ",[245,1815,1816],{},"/api/posts",[233,1818,1819,1820,1826],{},"See ",[250,1821,1823],{"href":1822},"/config#inlinedynamicimports",[245,1824,1825],{},"inlineDynamicImports"," to bundle everything into a single file.",[237,1828,1830],{"id":1829},"route-rules","Route rules",[233,1832,1833],{},"Nitro allows you to add logic at the top-level for each route of your configuration. It can be used for redirecting, proxying, caching and adding headers to routes.",[233,1835,1836,1837,1842],{},"It is a map from route pattern (following ",[250,1838,1841],{"href":1839,"rel":1840},"https://github.com/h3js/rou3",[254],"rou3",") to route options.",[233,1844,1845,1846,1849,1850,1853,1854,1857],{},"When ",[245,1847,1848],{},"cache"," option is set, handlers matching pattern will be automatically wrapped with ",[245,1851,1852],{},"defineCachedEventHandler",". See the ",[250,1855,1856],{"href":64},"cache guide"," to learn more about this function.",[564,1859,1860],{},[233,1861,1862,1865,1866],{},[245,1863,1864],{},"swr: true|number"," is shortcut for ",[245,1867,1868],{},"cache: { swr: true, maxAge: number }",[233,1870,1871,1872,1875],{},"You can set route rules in the ",[245,1873,1874],{},"nitro.routeRules"," options.",[261,1877,1880],{"className":263,"code":1878,"filename":1879,"language":266,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineConfig({\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  }\n});\n","nitro.config.ts",[245,1881,1882,1896,1900,1911,1916,1929,1940,1951,1964,1983,2006,2019,2031,2045,2058,2063],{"__ignoreMap":5},[270,1883,1884,1886,1889,1891,1894],{"class":272,"line":273},[270,1885,277],{"class":276},[270,1887,1888],{"class":283}," { defineNitroConfig } ",[270,1890,287],{"class":276},[270,1892,1893],{"class":290}," \"nitro/config\"",[270,1895,294],{"class":283},[270,1897,1898],{"class":272,"line":297},[270,1899,301],{"emptyLinePlaceholder":300},[270,1901,1902,1904,1906,1909],{"class":272,"line":304},[270,1903,307],{"class":276},[270,1905,310],{"class":276},[270,1907,1908],{"class":322}," defineConfig",[270,1910,1492],{"class":283},[270,1912,1913],{"class":272,"line":335},[270,1914,1915],{"class":283},"  routeRules: {\n",[270,1917,1918,1921,1924,1926],{"class":272,"line":346},[270,1919,1920],{"class":290},"    '/blog/**'",[270,1922,1923],{"class":283},": { swr: ",[270,1925,1176],{"class":721},[270,1927,1928],{"class":283}," },\n",[270,1930,1931,1933,1935,1938],{"class":272,"line":409},[270,1932,1920],{"class":290},[270,1934,1923],{"class":283},[270,1936,1937],{"class":721},"600",[270,1939,1928],{"class":283},[270,1941,1942,1944,1947,1949],{"class":272,"line":492},[270,1943,1920],{"class":290},[270,1945,1946],{"class":283},": { static: ",[270,1948,1176],{"class":721},[270,1950,1928],{"class":283},[270,1952,1953,1955,1958,1961],{"class":272,"line":498},[270,1954,1920],{"class":290},[270,1956,1957],{"class":283},": { cache: { ",[270,1959,1960],{"class":377},"/* cache options*/",[270,1962,1963],{"class":283}," } },\n",[270,1965,1966,1969,1972,1975,1978,1981],{"class":272,"line":1072},[270,1967,1968],{"class":290},"    '/assets/**'",[270,1970,1971],{"class":283},": { headers: { ",[270,1973,1974],{"class":290},"'cache-control'",[270,1976,1977],{"class":283},": ",[270,1979,1980],{"class":290},"'s-maxage=0'",[270,1982,1963],{"class":283},[270,1984,1985,1988,1991,1993,1996,1999,2001,2004],{"class":272,"line":1082},[270,1986,1987],{"class":290},"    '/api/v1/**'",[270,1989,1990],{"class":283},": { cors: ",[270,1992,1176],{"class":721},[270,1994,1995],{"class":283},", headers: { ",[270,1997,1998],{"class":290},"'access-control-allow-methods'",[270,2000,1977],{"class":283},[270,2002,2003],{"class":290},"'GET'",[270,2005,1963],{"class":283},[270,2007,2008,2011,2014,2017],{"class":272,"line":1552},[270,2009,2010],{"class":290},"    '/old-page'",[270,2012,2013],{"class":283},": { redirect: ",[270,2015,2016],{"class":290},"'/new-page'",[270,2018,1928],{"class":283},[270,2020,2021,2024,2026,2029],{"class":272,"line":1557},[270,2022,2023],{"class":290},"    '/old-page/**'",[270,2025,2013],{"class":283},[270,2027,2028],{"class":290},"'/new-page/**'",[270,2030,1928],{"class":283},[270,2032,2034,2037,2040,2043],{"class":272,"line":2033},13,[270,2035,2036],{"class":290},"    '/proxy/example'",[270,2038,2039],{"class":283},": { proxy: ",[270,2041,2042],{"class":290},"'https://example.com'",[270,2044,1928],{"class":283},[270,2046,2048,2051,2053,2056],{"class":272,"line":2047},14,[270,2049,2050],{"class":290},"    '/proxy/**'",[270,2052,2039],{"class":283},[270,2054,2055],{"class":290},"'/api/**'",[270,2057,1928],{"class":283},[270,2059,2061],{"class":272,"line":2060},15,[270,2062,1765],{"class":283},[270,2064,2066],{"class":272,"line":2065},16,[270,2067,412],{"class":283},[2069,2070,2071],"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":297,"depth":297,"links":2073},[2074,2075,2082,2088,2089,2090],{"id":239,"depth":297,"text":240},{"id":415,"depth":297,"text":416,"children":2076},[2077,2078,2079,2080,2081],{"id":572,"depth":304,"text":573},{"id":642,"depth":304,"text":643},{"id":976,"depth":304,"text":977},{"id":1185,"depth":304,"text":1186},{"id":1259,"depth":304,"text":1260},{"id":1292,"depth":297,"text":1293,"children":2083},[2084,2085,2086,2087],{"id":1346,"depth":304,"text":1347},{"id":1436,"depth":304,"text":1437},{"id":1583,"depth":304,"text":1584},{"id":1674,"depth":304,"text":1675},{"id":1772,"depth":297,"text":1773},{"id":1805,"depth":297,"text":1806},{"id":1829,"depth":297,"text":1830},"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":2091},"zYCmnqPsWm4qxo1W57Tpsv_KgKZda8TmBIpT_Kq98ec",[2097,2099],{"title":18,"path":19,"stem":20,"description":2098,"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},1773050448394]