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