[{"data":1,"prerenderedAt":487},["ShallowReactive",2],{"navigation":3,"-deploy":217,"-deploy-surround":482},[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":84,"body":219,"description":476,"extension":477,"meta":478,"navigation":479,"path":85,"seo":480,"stem":86,"__hash__":481},"content/2.deploy/0.index.md",{"type":220,"value":221,"toc":470,"icon":89},"minimark",[222,226,231,240,248,252,255,300,310,314,333,336,346,374,383,446,450,453,456,463,466],[223,224,225],"p",{},"Nitro can generate different output formats suitable for different hosting providers from the same code base.\nUsing built-in presets, you can easily configure Nitro to adjust its output format with almost no additional code or configuration!",[227,228,230],"h2",{"id":229},"default-output","Default output",[223,232,233,234,239],{},"The default production output preset is ",[235,236,238],"a",{"href":237},"/deploy/node","Node.js server",".",[223,241,242,243,247],{},"When running Nitro in development mode, Nitro will always use a special preset called ",[244,245,246],"code",{},"nitro-dev"," using Node.js with ESM in an isolated Worker environment with behavior as close as possible to the production environment.",[227,249,251],{"id":250},"zero-config-providers","Zero-Config Providers",[223,253,254],{},"When deploying to production using CI/CD, Nitro tries to automatically detect the provider environment and set the right one without any additional configuration required. Currently, the providers below can be auto-detected with zero config.",[256,257,258,264,269,274,280,285,290,295],"ul",{},[259,260,261],"li",{},[235,262,263],{"href":126},"aws amplify",[259,265,266],{},[235,267,268],{"href":130},"azure",[259,270,271],{},[235,272,273],{"href":138},"cloudflare",[259,275,276],{},[235,277,279],{"href":278},"/deploy/providers/firebase#firebase-app-hosting","firebase app hosting",[259,281,282],{},[235,283,284],{"href":182},"netlify",[259,286,287],{},[235,288,289],{"href":194},"stormkit",[259,291,292],{},[235,293,294],{"href":198},"vercel",[259,296,297],{},[235,298,299],{"href":202},"zeabur",[301,302,303],"warning",{},[223,304,305,306,309],{},"For Turborepo users, zero config detection will be interferenced by its Strict Environment Mode. You may need to allowing the variables explictly or use its Loose Environment Mode (with ",[244,307,308],{},"--env-mode=loose"," flag).",[227,311,313],{"id":312},"changing-the-deployment-preset","Changing the deployment preset",[223,315,316,317,320,321,324,325,328,329,332],{},"If you need to build Nitro against a specific provider, you can target it by defining an environment variable named ",[244,318,319],{},"NITRO_PRESET"," or ",[244,322,323],{},"SERVER_PRESET",", or by updating your Nitro ",[235,326,327],{"href":34},"configuration"," or using ",[244,330,331],{},"--preset"," argument.",[223,334,335],{},"Using the environment variable approach is recommended for deployments depending on CI/CD.",[223,337,338,342,343,345],{},[339,340,341],"strong",{},"Example:"," Defining a ",[244,344,319],{}," environment variable",[347,348,352],"pre",{"className":349,"code":350,"language":351,"meta":5,"style":5},"language-bash shiki shiki-themes github-light github-dark github-dark","nitro build --preset cloudflare_pages\n","bash",[244,353,354],{"__ignoreMap":5},[355,356,359,363,367,371],"span",{"class":357,"line":358},"line",1,[355,360,362],{"class":361},"shcOC","nitro",[355,364,366],{"class":365},"sfrk1"," build",[355,368,370],{"class":369},"suiK_"," --preset",[355,372,373],{"class":365}," cloudflare_pages\n",[223,375,376,378,379,382],{},[339,377,341],{}," Updating the ",[244,380,381],{},"nitro.config.ts"," file",[347,384,388],{"className":385,"code":386,"language":387,"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  preset: 'cloudflare_pages'\n})\n","ts",[244,389,390,409,416,431,440],{"__ignoreMap":5},[355,391,392,396,400,403,406],{"class":357,"line":358},[355,393,395],{"class":394},"so5gQ","import",[355,397,399],{"class":398},"slsVL"," { defineNitroConfig } ",[355,401,402],{"class":394},"from",[355,404,405],{"class":365}," \"nitro/config\"",[355,407,408],{"class":398},";\n",[355,410,412],{"class":357,"line":411},2,[355,413,415],{"emptyLinePlaceholder":414},true,"\n",[355,417,419,422,425,428],{"class":357,"line":418},3,[355,420,421],{"class":394},"export",[355,423,424],{"class":394}," default",[355,426,427],{"class":361}," defineNitroConfig",[355,429,430],{"class":398},"({\n",[355,432,434,437],{"class":357,"line":433},4,[355,435,436],{"class":398},"  preset: ",[355,438,439],{"class":365},"'cloudflare_pages'\n",[355,441,443],{"class":357,"line":442},5,[355,444,445],{"class":398},"})\n",[227,447,449],{"id":448},"compatibility-date","Compatibility date",[223,451,452],{},"Deployment providers regularly update their runtime behavior. Nitro presets are updated to support these new features.",[223,454,455],{},"To prevent breaking existing deployments, Nitro uses compatibility dates. These dates let you lock in behavior at the project creation time. You can also opt in to future updates when ready.",[223,457,458,459,462],{},"When you create a new project, the ",[244,460,461],{},"compatibilityDate"," is set to the current date. This setting is saved in your project's configuration.",[223,464,465],{},"You should update the compatibility date periodically. Always test your deployment thoroughly after updating. Below is a list of key dates and their effects.",[467,468,469],"style",{},"html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}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 .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}",{"title":5,"searchDepth":411,"depth":411,"links":471},[472,473,474,475],{"id":229,"depth":411,"text":230},{"id":250,"depth":411,"text":251},{"id":312,"depth":411,"text":313},{"id":448,"depth":411,"text":449},"Learn more about Nitro deploy providers.","md",{"automd":414,"icon":89},{"icon":89},{"title":84,"description":476},"gMgklMTw1G0l8YBqBEs2CEZL-wgjBFEaQ6q-Id7qAa0",[483,485],{"title":78,"path":79,"stem":80,"description":484,"icon":81,"children":-1},"Nitro has a nightly release channel that automatically releases for every commit to main branch to try latest changes.",{"title":96,"path":97,"stem":98,"description":486,"icon":99,"children":-1},"Run Nitro apps with Node.js runtime.",1764005309694]