[{"data":1,"prerenderedAt":540},["ShallowReactive",2],{"navigation":3,"-deploy":234,"-deploy-surround":535},[4,81,228],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","/guide","1.guide/0.index",[9,11,16,21,26,31,36,41,46,51,56,61,66,71,76],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Migration Guide","/guide/migration","1.guide/00.migration","ri:arrow-right-up-line",{"title":17,"path":18,"stem":19,"icon":20},"Server Utils","/guide/utils","1.guide/1.utils","ri:tools-line",{"title":22,"path":23,"stem":24,"icon":25},"Tasks","/guide/tasks","1.guide/10.tasks","codicon:run-all",{"title":27,"path":28,"stem":29,"icon":30},"Server Routes","/guide/routing","1.guide/2.routing","ri:direction-line",{"title":32,"path":33,"stem":34,"icon":35},"WebSocket","/guide/websocket","1.guide/3.websocket","cib:socket-io",{"title":37,"path":38,"stem":39,"icon":40},"KV Storage","/guide/storage","1.guide/4.storage","carbon:datastore",{"title":42,"path":43,"stem":44,"icon":45},"SQL Database","/guide/database","1.guide/5.database","ri:database-2-line",{"title":47,"path":48,"stem":49,"icon":50},"Cache","/guide/cache","1.guide/6.cache","ri:speed-line",{"title":52,"path":53,"stem":54,"icon":55},"Fetch","/guide/fetch","1.guide/7.fetch","ri:global-line",{"title":57,"path":58,"stem":59,"icon":60},"Assets","/guide/assets","1.guide/8.assets","ri:image-2-line",{"title":62,"path":63,"stem":64,"icon":65},"Plugins","/guide/plugins","1.guide/9.plugins","ri:plug-line",{"title":67,"path":68,"stem":69,"icon":70},"Configuration","/guide/configuration","1.guide/97.configuration","ri:settings-3-line",{"title":72,"path":73,"stem":74,"icon":75},"TypeScript","/guide/typescript","1.guide/98.typescript","tabler:brand-typescript",{"title":77,"path":78,"stem":79,"icon":80},"Nightly Channel","/guide/nightly","1.guide/99.nightly","ri:moon-fill",{"title":82,"path":83,"stem":84,"children":85,"icon":87},"Overview","/deploy","2.deploy/0.index",[86,88,92,122,127],{"title":82,"path":83,"stem":84,"icon":87},"ri:upload-cloud-2-line",{"title":89,"path":90,"stem":91,"icon":55},"Edge Workers","/deploy/workers","2.deploy/1.workers",{"title":93,"path":94,"stem":95,"children":96,"page":121},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[97,102,106,111,116],{"title":98,"path":99,"stem":100,"icon":101},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":103,"path":104,"stem":105,"icon":25},"Dir","/deploy/runtimes/_dir","2.deploy/10.runtimes/_dir",{"title":107,"path":108,"stem":109,"icon":110},"WinterJS","/deploy/runtimes/_winterjs","2.deploy/10.runtimes/_winterjs","game-icons:cold-heart",{"title":112,"path":113,"stem":114,"icon":115},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":117,"path":118,"stem":119,"icon":120},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":123,"path":124,"stem":125,"icon":126},"Custom Preset","/deploy/custom-presets","2.deploy/2.custom-presets","ri:file-code-line",{"title":128,"path":129,"stem":130,"children":131,"page":121},"Providers","/deploy/providers","2.deploy/20.providers",[132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224],{"title":103,"path":133,"stem":134,"icon":135},"/deploy/providers/_dir","2.deploy/20.providers/_dir","tdesign:cloud",{"title":137,"path":138,"stem":139},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":141,"path":142,"stem":143},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":145,"path":146,"stem":147},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":149,"path":150,"stem":151},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":153,"path":154,"stem":155},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":157,"path":158,"stem":159},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":161,"path":162,"stem":163},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":165,"path":166,"stem":167},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":169,"path":170,"stem":171},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":173,"path":174,"stem":175},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":177,"path":178,"stem":179},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":181,"path":182,"stem":183},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":185,"path":186,"stem":187},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":189,"path":190,"stem":191},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":193,"path":194,"stem":195},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":197,"path":198,"stem":199},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":201,"path":202,"stem":203},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":205,"path":206,"stem":207},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":209,"path":210,"stem":211},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":213,"path":214,"stem":215},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":217,"path":218,"stem":219},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":221,"path":222,"stem":223},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":225,"path":226,"stem":227},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":229,"path":230,"stem":231,"children":232,"icon":70},"Config","/config","3.config/0.index",[233],{"title":229,"path":230,"stem":231,"icon":70},{"id":235,"title":82,"body":236,"description":528,"extension":529,"meta":530,"navigation":532,"path":83,"seo":533,"stem":84,"__hash__":534},"content/2.deploy/0.index.md",{"type":237,"value":238,"toc":522,"icon":87},"minimark",[239,243,248,257,265,269,272,317,327,331,350,353,363,392,401,439,443,446,449,456,459,518],[240,241,242],"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!",[244,245,247],"h2",{"id":246},"default-output","Default output",[240,249,250,251,256],{},"The default production output preset is ",[252,253,255],"a",{"href":254},"/deploy/node","Node.js server",".",[240,258,259,260,264],{},"When running Nitro in development mode, Nitro will always use a special preset called ",[261,262,263],"code",{},"nitro-dev"," using Node.js with ESM in an isolated Worker environment with behavior as close as possible to the production environment.",[244,266,268],{"id":267},"zero-config-providers","Zero-Config Providers",[240,270,271],{},"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.",[273,274,275,281,286,291,297,302,307,312],"ul",{},[276,277,278],"li",{},[252,279,280],{"href":146},"aws amplify",[276,282,283],{},[252,284,285],{"href":150},"azure",[276,287,288],{},[252,289,290],{"href":158},"cloudflare",[276,292,293],{},[252,294,296],{"href":295},"/deploy/providers/firebase#firebase-app-hosting","firebase app hosting",[276,298,299],{},[252,300,301],{"href":202},"netlify",[276,303,304],{},[252,305,306],{"href":214},"stormkit",[276,308,309],{},[252,310,311],{"href":218},"vercel",[276,313,314],{},[252,315,316],{"href":222},"zeabur",[318,319,320],"warning",{},[240,321,322,323,326],{},"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 ",[261,324,325],{},"--env-mode=loose"," flag).",[244,328,330],{"id":329},"changing-the-deployment-preset","Changing the deployment preset",[240,332,333,334,337,338,341,342,345,346,349],{},"If you need to build Nitro against a specific provider, you can target it by defining an environment variable named ",[261,335,336],{},"NITRO_PRESET"," or ",[261,339,340],{},"SERVER_PRESET",", or by updating your Nitro ",[252,343,344],{"href":68},"configuration"," or using ",[261,347,348],{},"--preset"," argument.",[240,351,352],{},"Using the environment variable approach is recommended for deployments depending on CI/CD.",[240,354,355,359,360,362],{},[356,357,358],"strong",{},"Example:"," Defining a ",[261,361,336],{}," environment variable",[364,365,370],"pre",{"className":366,"code":367,"language":368,"meta":369,"style":369},"language-bash shiki shiki-themes github-light github-dark github-dark","nitro build --preset cloudflare_pages\n","bash","",[261,371,372],{"__ignoreMap":369},[373,374,377,381,385,389],"span",{"class":375,"line":376},"line",1,[373,378,380],{"class":379},"shcOC","nitro",[373,382,384],{"class":383},"sfrk1"," build",[373,386,388],{"class":387},"suiK_"," --preset",[373,390,391],{"class":383}," cloudflare_pages\n",[240,393,394,396,397,400],{},[356,395,358],{}," Updating the ",[261,398,399],{},"nitro.config.ts"," file",[364,402,406],{"className":403,"code":404,"language":405,"meta":369,"style":369},"language-ts shiki shiki-themes github-light github-dark github-dark","export default defineNitroConfig({\n  preset: 'cloudflare_pages'\n})\n","ts",[261,407,408,424,433],{"__ignoreMap":369},[373,409,410,414,417,420],{"class":375,"line":376},[373,411,413],{"class":412},"so5gQ","export",[373,415,416],{"class":412}," default",[373,418,419],{"class":379}," defineNitroConfig",[373,421,423],{"class":422},"slsVL","({\n",[373,425,427,430],{"class":375,"line":426},2,[373,428,429],{"class":422},"  preset: ",[373,431,432],{"class":383},"'cloudflare_pages'\n",[373,434,436],{"class":375,"line":435},3,[373,437,438],{"class":422},"})\n",[244,440,442],{"id":441},"compatibility-date","Compatibility date",[240,444,445],{},"Deployment providers regularly update their runtime behavior. Nitro presets are updated to support these new features.",[240,447,448],{},"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.",[240,450,451,452,455],{},"When you create a new project, the ",[261,453,454],{},"compatibilityDate"," is set to the current date. This setting is saved in your project's configuration.",[240,457,458],{},"You should update the compatibility date periodically. Always test your deployment thoroughly after updating. Below is a list of key dates and their effects.",[460,461,462,477],"table",{},[463,464,465],"thead",{},[466,467,468,471,474],"tr",{},[469,470,442],"th",{},[469,472,473],{},"Platform",[469,475,476],{},"Description",[478,479,480,493,505],"tbody",{},[466,481,482,488,490],{},[483,484,485],"td",{},[356,486,487],{},"≥ 2024-05-07",[483,489,301],{},[483,491,492],{},"Netlify functions v2",[466,494,495,500,502],{},[483,496,497],{},[356,498,499],{},"≥ 2024-09-19",[483,501,290],{},[483,503,504],{},"Static assets support for cloudflare-module preset",[466,506,507,512,515],{},[483,508,509],{},[356,510,511],{},"≥ 2025-01-30",[483,513,514],{},"deno",[483,516,517],{},"Deno v2 Node.js compatibility",[519,520,521],"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":369,"searchDepth":426,"depth":426,"links":523},[524,525,526,527],{"id":246,"depth":426,"text":247},{"id":267,"depth":426,"text":268},{"id":329,"depth":426,"text":330},{"id":441,"depth":426,"text":442},"Learn more about Nitro deploy providers.","md",{"automd":531,"icon":87},true,{"icon":87},{"title":82,"description":528},"GOPwOGLUFcv1lZFnLd1EmF7HohG_yT1xSRqQo6FBaL8",[536,538],{"title":77,"path":78,"stem":79,"description":537,"icon":80,"children":-1},"Nitro has a nightly release channel that automatically releases for every commit to main branch to try latest changes.",{"title":89,"path":90,"stem":91,"description":539,"icon":55,"children":-1},"Nitro provides out of the box support for deploying to Edge Workers.",1778145696084]