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