[{"data":1,"prerenderedAt":610},["ShallowReactive",2],{"navigation":3,"-docs-lifecycle":224,"-docs-lifecycle-surround":605},[4,83,208,214,221],{"title":5,"path":6,"stem":7,"children":8,"icon":82},"","/docs","1.docs/1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-compass",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","/docs/quick-start","1.docs/2.quick-start","i-lucide-zap",{"title":18,"path":19,"stem":20,"icon":21},"Renderer","/docs/renderer","1.docs/4.renderer","ri:layout-masonry-line",{"title":23,"path":24,"stem":25,"icon":26},"Routing","/docs/routing","1.docs/5.routing","ri:direction-line",{"title":28,"path":29,"stem":30,"icon":31},"Assets","/docs/assets","1.docs/50.assets","ri:image-2-line",{"title":33,"path":34,"stem":35,"icon":36},"Configuration","/docs/configuration","1.docs/50.configuration","ri:settings-3-line",{"title":38,"path":39,"stem":40,"icon":41},"Database","/docs/database","1.docs/50.database","ri:database-2-line",{"title":43,"path":44,"stem":45,"icon":46},"Lifecycle","/docs/lifecycle","1.docs/50.lifecycle","i-lucide-layers",{"title":48,"path":49,"stem":50,"icon":51},"Plugins","/docs/plugins","1.docs/50.plugins","ri:plug-line",{"title":53,"path":54,"stem":55,"icon":56},"Tasks","/docs/tasks","1.docs/50.tasks","codicon:run-all",{"title":58,"path":59,"stem":60,"icon":61},"Server Entry","/docs/server-entry","1.docs/6.server-entry","ri:server-line",{"title":63,"path":64,"stem":65,"icon":66},"Cache","/docs/cache","1.docs/7.cache","ri:speed-line",{"title":68,"path":69,"stem":70,"icon":71},"KV Storage","/docs/storage","1.docs/8.storage","carbon:datastore",{"title":73,"path":74,"stem":75,"icon":76},"Migration Guide","/docs/migration","1.docs/99.migration","ri:arrow-right-up-line",{"title":78,"path":79,"stem":80,"icon":81},"Nightly Channel","/docs/nightly","1.docs/99.nightly","ri:moon-fill","i-lucide-book-open",{"title":84,"path":85,"stem":86,"children":87,"icon":89},"Deploy","/deploy","2.deploy/0.index",[88,90,111],{"title":84,"path":85,"stem":86,"icon":89},"ri:upload-cloud-2-line",{"title":91,"path":92,"stem":93,"children":94,"page":110},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[95,100,105],{"title":96,"path":97,"stem":98,"icon":99},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":101,"path":102,"stem":103,"icon":104},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":106,"path":107,"stem":108,"icon":109},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":112,"path":113,"stem":114,"children":115,"page":110},"Providers","/deploy/providers","2.deploy/20.providers",[116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204],{"title":117,"path":118,"stem":119},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":121,"path":122,"stem":123},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":125,"path":126,"stem":127},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":129,"path":130,"stem":131},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":133,"path":134,"stem":135},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":137,"path":138,"stem":139},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":141,"path":142,"stem":143},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":145,"path":146,"stem":147},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":149,"path":150,"stem":151},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":153,"path":154,"stem":155},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":157,"path":158,"stem":159},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":161,"path":162,"stem":163},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":165,"path":166,"stem":167},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":169,"path":170,"stem":171},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":173,"path":174,"stem":175},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":177,"path":178,"stem":179},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":181,"path":182,"stem":183},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":185,"path":186,"stem":187},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":189,"path":190,"stem":191},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":193,"path":194,"stem":195},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":197,"path":198,"stem":199},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":201,"path":202,"stem":203},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":205,"path":206,"stem":207},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":209,"path":210,"stem":211,"children":212,"icon":36},"Config","/config","3.config/0.index",[213],{"title":209,"path":210,"stem":211,"icon":36},{"title":215,"path":216,"stem":217,"children":218,"icon":220},"Examples","/examples","4.examples/0.index",[219],{"title":215,"path":216,"stem":217,"icon":220},"i-lucide-folder-code",{"title":5,"path":222,"stem":223},"/","index",{"id":225,"title":43,"body":226,"description":599,"extension":600,"meta":601,"navigation":602,"path":44,"seo":603,"stem":45,"__hash__":604},"content/1.docs/50.lifecycle.md",{"type":227,"value":228,"toc":593,"icon":46},"minimark",[229,236,239,589],[230,231,232],"warning",{},[233,234,235],"p",{},"Nitro v3 Alpha docs are a work in progress — expect updates, rough edges, and occasional inaccuracies.",[233,237,238],{},"A request can be intercepted and terminated (with or without a response) from any of these layers, in this order:",[240,241,242,247,250,345,350,354,361,432,437,443,447,454,485,491,498,573,578,581,584],"steps",{},[243,244,246],"h3",{"id":245},"route-rules","Route rules",[233,248,249],{},"The matching route rule defined in the Nitro config will execute. Note that most of the route rules can alter the response without terminating it (for instance, adding a header).",[251,252,257],"pre",{"className":253,"code":254,"filename":255,"language":256,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  routeRules: {\n    '/**': { headers: { 'x-nitro': 'first' } }\n  }\n})\n","nitro.config.ts","ts",[258,259,260,283,290,306,312,333,339],"code",{"__ignoreMap":5},[261,262,265,269,273,276,280],"span",{"class":263,"line":264},"line",1,[261,266,268],{"class":267},"so5gQ","import",[261,270,272],{"class":271},"slsVL"," { defineNitroConfig } ",[261,274,275],{"class":267},"from",[261,277,279],{"class":278},"sfrk1"," \"nitro/config\"",[261,281,282],{"class":271},";\n",[261,284,286],{"class":263,"line":285},2,[261,287,289],{"emptyLinePlaceholder":288},true,"\n",[261,291,293,296,299,303],{"class":263,"line":292},3,[261,294,295],{"class":267},"export",[261,297,298],{"class":267}," default",[261,300,302],{"class":301},"shcOC"," defineNitroConfig",[261,304,305],{"class":271},"({\n",[261,307,309],{"class":263,"line":308},4,[261,310,311],{"class":271},"  routeRules: {\n",[261,313,315,318,321,324,327,330],{"class":263,"line":314},5,[261,316,317],{"class":278},"    '/**'",[261,319,320],{"class":271},": { headers: { ",[261,322,323],{"class":278},"'x-nitro'",[261,325,326],{"class":271},": ",[261,328,329],{"class":278},"'first'",[261,331,332],{"class":271}," } }\n",[261,334,336],{"class":263,"line":335},6,[261,337,338],{"class":271},"  }\n",[261,340,342],{"class":263,"line":341},7,[261,343,344],{"class":271},"})\n",[346,347],"read-more",{"to":348,"title":349},"/docs/routing#route-rules","Routing > Route rules",[243,351,353],{"id":352},"global-middleware","Global middleware",[233,355,356,357,360],{},"Any global middleware defined in the ",[258,358,359],{},"middleware/"," directory will be run:",[251,362,365],{"className":253,"code":363,"filename":364,"language":256,"meta":5,"style":5},"import { defineHandler } from \"nitro/h3\";\n\nexport default defineHandler((event) => {\n  event.context.info = { name: \"Nitro\" };\n});\n","middleware/info.ts",[258,366,367,381,385,410,427],{"__ignoreMap":5},[261,368,369,371,374,376,379],{"class":263,"line":264},[261,370,268],{"class":267},[261,372,373],{"class":271}," { defineHandler } ",[261,375,275],{"class":267},[261,377,378],{"class":278}," \"nitro/h3\"",[261,380,282],{"class":271},[261,382,383],{"class":263,"line":285},[261,384,289],{"emptyLinePlaceholder":288},[261,386,387,389,391,394,397,401,404,407],{"class":263,"line":292},[261,388,295],{"class":267},[261,390,298],{"class":267},[261,392,393],{"class":301}," defineHandler",[261,395,396],{"class":271},"((",[261,398,400],{"class":399},"sQHwn","event",[261,402,403],{"class":271},") ",[261,405,406],{"class":267},"=>",[261,408,409],{"class":271}," {\n",[261,411,412,415,418,421,424],{"class":263,"line":308},[261,413,414],{"class":271},"  event.context.info ",[261,416,417],{"class":267},"=",[261,419,420],{"class":271}," { name: ",[261,422,423],{"class":278},"\"Nitro\"",[261,425,426],{"class":271}," };\n",[261,428,429],{"class":263,"line":314},[261,430,431],{"class":271},"});\n",[230,433,434],{},[233,435,436],{},"Returning from a middleware will close the request and should be avoided when possible.",[346,438,440],{"to":439},"/docs/middleware",[233,441,442],{},"Learn more about Nitro middleware.",[243,444,446],{"id":445},"routes","Routes",[233,448,449,450,453],{},"Nitro will look at defined routes in the ",[258,451,452],{},"routes/"," folder to match the incoming request.",[251,455,458],{"className":253,"code":456,"filename":457,"language":256,"meta":5,"style":5},"export default (event) => ({ world: true })\n","routes/api/hello.ts",[258,459,460],{"__ignoreMap":5},[261,461,462,464,466,469,471,473,475,478,482],{"class":263,"line":264},[261,463,295],{"class":267},[261,465,298],{"class":267},[261,467,468],{"class":271}," (",[261,470,400],{"class":399},[261,472,403],{"class":271},[261,474,406],{"class":267},[261,476,477],{"class":271}," ({ world: ",[261,479,481],{"class":480},"suiK_","true",[261,483,484],{"class":271}," })\n",[346,486,488],{"to":487},"/docs/routing#filesystem-routing",[233,489,490],{},"Learn more about Nitro file-system routing.",[233,492,493,494,497],{},"If serverEntry is defined it will catch all requests not matching any other route acting as ",[258,495,496],{},"/**"," route handler.",[251,499,502],{"className":253,"code":500,"filename":501,"language":256,"meta":5,"style":5},"import { defineHandler } from \"nitro/h3\";\n\nexport default defineHandler((event) => {\n  if (event.path === \"/\") {\n    return \"Home page\";\n  }\n});\n","server.ts",[258,503,504,516,520,538,555,565,569],{"__ignoreMap":5},[261,505,506,508,510,512,514],{"class":263,"line":264},[261,507,268],{"class":267},[261,509,373],{"class":271},[261,511,275],{"class":267},[261,513,378],{"class":278},[261,515,282],{"class":271},[261,517,518],{"class":263,"line":285},[261,519,289],{"emptyLinePlaceholder":288},[261,521,522,524,526,528,530,532,534,536],{"class":263,"line":292},[261,523,295],{"class":267},[261,525,298],{"class":267},[261,527,393],{"class":301},[261,529,396],{"class":271},[261,531,400],{"class":399},[261,533,403],{"class":271},[261,535,406],{"class":267},[261,537,409],{"class":271},[261,539,540,543,546,549,552],{"class":263,"line":308},[261,541,542],{"class":267},"  if",[261,544,545],{"class":271}," (event.path ",[261,547,548],{"class":267},"===",[261,550,551],{"class":278}," \"/\"",[261,553,554],{"class":271},") {\n",[261,556,557,560,563],{"class":263,"line":314},[261,558,559],{"class":267},"    return",[261,561,562],{"class":278}," \"Home page\"",[261,564,282],{"class":271},[261,566,567],{"class":263,"line":335},[261,568,338],{"class":271},[261,570,571],{"class":263,"line":341},[261,572,431],{"class":271},[346,574,575],{"to":59},[233,576,577],{},"Learn more about Nitro server entry.",[243,579,18],{"id":580},"renderer",[233,582,583],{},"If no route is matched, Nitro will look for a renderer handler (defined or auto-detected) to handle the request.",[346,585,586],{"to":19},[233,587,588],{},"Learn more about Nitro renderer.",[590,591,592],"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 .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 .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}",{"title":5,"searchDepth":285,"depth":285,"links":594},[595,596,597,598],{"id":245,"depth":292,"text":246},{"id":352,"depth":292,"text":353},{"id":445,"depth":292,"text":446},{"id":580,"depth":292,"text":18},"Understand how Nitro runs and serves incoming requests to your application.","md",{"icon":46},{"icon":46},{"title":43,"description":599},"7cKQgGhgE50oO-EsPgwsBDR34uldS9mv4xaooF9Yd6w",[606,608],{"title":38,"path":39,"stem":40,"description":607,"icon":41,"children":-1},"Nitro provides a built-in and lightweight SQL database layer.",{"title":48,"path":49,"stem":50,"description":609,"icon":51,"children":-1},"Use plugins to extend Nitro's runtime behavior.",1773050249959]