[{"data":1,"prerenderedAt":614},["ShallowReactive",2],{"navigation":3,"-docs-lifecycle":228,"-docs-lifecycle-surround":609},[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":43,"body":230,"description":603,"extension":604,"meta":605,"navigation":606,"path":44,"seo":607,"stem":45,"__hash__":608},"content/1.docs/50.lifecycle.md",{"type":231,"value":232,"toc":597,"icon":46},"minimark",[233,240,243,593],[234,235,236],"warning",{},[237,238,239],"p",{},"Nitro v3 Alpha docs are a work in progress — expect updates, rough edges, and occasional inaccuracies.",[237,241,242],{},"A request can be intercepted and terminated (with or without a response) from any of these layers, in this order:",[244,245,246,251,254,349,354,358,365,436,441,447,451,458,489,495,502,577,582,585,588],"steps",{},[247,248,250],"h3",{"id":249},"route-rules","Route rules",[237,252,253],{},"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).",[255,256,261],"pre",{"className":257,"code":258,"filename":259,"language":260,"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",[262,263,264,287,294,310,316,337,343],"code",{"__ignoreMap":5},[265,266,269,273,277,280,284],"span",{"class":267,"line":268},"line",1,[265,270,272],{"class":271},"so5gQ","import",[265,274,276],{"class":275},"slsVL"," { defineNitroConfig } ",[265,278,279],{"class":271},"from",[265,281,283],{"class":282},"sfrk1"," \"nitro/config\"",[265,285,286],{"class":275},";\n",[265,288,290],{"class":267,"line":289},2,[265,291,293],{"emptyLinePlaceholder":292},true,"\n",[265,295,297,300,303,307],{"class":267,"line":296},3,[265,298,299],{"class":271},"export",[265,301,302],{"class":271}," default",[265,304,306],{"class":305},"shcOC"," defineNitroConfig",[265,308,309],{"class":275},"({\n",[265,311,313],{"class":267,"line":312},4,[265,314,315],{"class":275},"  routeRules: {\n",[265,317,319,322,325,328,331,334],{"class":267,"line":318},5,[265,320,321],{"class":282},"    '/**'",[265,323,324],{"class":275},": { headers: { ",[265,326,327],{"class":282},"'x-nitro'",[265,329,330],{"class":275},": ",[265,332,333],{"class":282},"'first'",[265,335,336],{"class":275}," } }\n",[265,338,340],{"class":267,"line":339},6,[265,341,342],{"class":275},"  }\n",[265,344,346],{"class":267,"line":345},7,[265,347,348],{"class":275},"})\n",[350,351],"read-more",{"to":352,"title":353},"/docs/routing#route-rules","Routing > Route rules",[247,355,357],{"id":356},"global-middleware","Global middleware",[237,359,360,361,364],{},"Any global middleware defined in the ",[262,362,363],{},"middleware/"," directory will be run:",[255,366,369],{"className":257,"code":367,"filename":368,"language":260,"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",[262,370,371,385,389,414,431],{"__ignoreMap":5},[265,372,373,375,378,380,383],{"class":267,"line":268},[265,374,272],{"class":271},[265,376,377],{"class":275}," { defineHandler } ",[265,379,279],{"class":271},[265,381,382],{"class":282}," \"nitro/h3\"",[265,384,286],{"class":275},[265,386,387],{"class":267,"line":289},[265,388,293],{"emptyLinePlaceholder":292},[265,390,391,393,395,398,401,405,408,411],{"class":267,"line":296},[265,392,299],{"class":271},[265,394,302],{"class":271},[265,396,397],{"class":305}," defineHandler",[265,399,400],{"class":275},"((",[265,402,404],{"class":403},"sQHwn","event",[265,406,407],{"class":275},") ",[265,409,410],{"class":271},"=>",[265,412,413],{"class":275}," {\n",[265,415,416,419,422,425,428],{"class":267,"line":312},[265,417,418],{"class":275},"  event.context.info ",[265,420,421],{"class":271},"=",[265,423,424],{"class":275}," { name: ",[265,426,427],{"class":282},"\"Nitro\"",[265,429,430],{"class":275}," };\n",[265,432,433],{"class":267,"line":318},[265,434,435],{"class":275},"});\n",[234,437,438],{},[237,439,440],{},"Returning from a middleware will close the request and should be avoided when possible.",[350,442,444],{"to":443},"/docs/middleware",[237,445,446],{},"Learn more about Nitro middleware.",[247,448,450],{"id":449},"routes","Routes",[237,452,453,454,457],{},"Nitro will look at defined routes in the ",[262,455,456],{},"routes/"," folder to match the incoming request.",[255,459,462],{"className":257,"code":460,"filename":461,"language":260,"meta":5,"style":5},"export default (event) => ({ world: true })\n","routes/api/hello.ts",[262,463,464],{"__ignoreMap":5},[265,465,466,468,470,473,475,477,479,482,486],{"class":267,"line":268},[265,467,299],{"class":271},[265,469,302],{"class":271},[265,471,472],{"class":275}," (",[265,474,404],{"class":403},[265,476,407],{"class":275},[265,478,410],{"class":271},[265,480,481],{"class":275}," ({ world: ",[265,483,485],{"class":484},"suiK_","true",[265,487,488],{"class":275}," })\n",[350,490,492],{"to":491},"/docs/routing#filesystem-routing",[237,493,494],{},"Learn more about Nitro file-system routing.",[237,496,497,498,501],{},"If serverEntry is defined it will catch all requests not matching any other route acting as ",[262,499,500],{},"/**"," route handler.",[255,503,506],{"className":257,"code":504,"filename":505,"language":260,"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",[262,507,508,520,524,542,559,569,573],{"__ignoreMap":5},[265,509,510,512,514,516,518],{"class":267,"line":268},[265,511,272],{"class":271},[265,513,377],{"class":275},[265,515,279],{"class":271},[265,517,382],{"class":282},[265,519,286],{"class":275},[265,521,522],{"class":267,"line":289},[265,523,293],{"emptyLinePlaceholder":292},[265,525,526,528,530,532,534,536,538,540],{"class":267,"line":296},[265,527,299],{"class":271},[265,529,302],{"class":271},[265,531,397],{"class":305},[265,533,400],{"class":275},[265,535,404],{"class":403},[265,537,407],{"class":275},[265,539,410],{"class":271},[265,541,413],{"class":275},[265,543,544,547,550,553,556],{"class":267,"line":312},[265,545,546],{"class":271},"  if",[265,548,549],{"class":275}," (event.path ",[265,551,552],{"class":271},"===",[265,554,555],{"class":282}," \"/\"",[265,557,558],{"class":275},") {\n",[265,560,561,564,567],{"class":267,"line":318},[265,562,563],{"class":271},"    return",[265,565,566],{"class":282}," \"Home page\"",[265,568,286],{"class":275},[265,570,571],{"class":267,"line":339},[265,572,342],{"class":275},[265,574,575],{"class":267,"line":345},[265,576,435],{"class":275},[350,578,579],{"to":59},[237,580,581],{},"Learn more about Nitro server entry.",[247,583,18],{"id":584},"renderer",[237,586,587],{},"If no route is matched, Nitro will look for a renderer handler (defined or auto-detected) to handle the request.",[350,589,590],{"to":19},[237,591,592],{},"Learn more about Nitro renderer.",[594,595,596],"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":289,"depth":289,"links":598},[599,600,601,602],{"id":249,"depth":296,"text":250},{"id":356,"depth":296,"text":357},{"id":449,"depth":296,"text":450},{"id":584,"depth":296,"text":18},"Understand how Nitro runs and serves incoming requests to your application.","md",{"icon":46},{"icon":46},{"title":43,"description":603},"7cKQgGhgE50oO-EsPgwsBDR34uldS9mv4xaooF9Yd6w",[610,612],{"title":38,"path":39,"stem":40,"description":611,"icon":41,"children":-1},"Nitro provides a built-in and lightweight SQL database layer.",{"title":48,"path":49,"stem":50,"description":613,"icon":51,"children":-1},"Use plugins to extend Nitro's runtime behavior.",1773176970100]