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