[{"data":1,"prerenderedAt":1396},["ShallowReactive",2],{"navigation":3,"-docs-migration":402,"-docs-migration-surround":1391},[4,93,226,232,387,399],{"title":5,"path":6,"stem":7,"children":8,"icon":92},"","\u002Fdocs","1.docs\u002F1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82,87],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-compass",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","\u002Fdocs\u002Fquick-start","1.docs\u002F2.quick-start","i-lucide-zap",{"title":18,"path":19,"stem":20,"icon":21},"Renderer","\u002Fdocs\u002Frenderer","1.docs\u002F4.renderer","ri:layout-masonry-line",{"title":23,"path":24,"stem":25,"icon":26},"Routing","\u002Fdocs\u002Frouting","1.docs\u002F5.routing","ri:direction-line",{"title":28,"path":29,"stem":30,"icon":31},"Assets","\u002Fdocs\u002Fassets","1.docs\u002F50.assets","ri:image-2-line",{"title":33,"path":34,"stem":35,"icon":36},"Configuration","\u002Fdocs\u002Fconfiguration","1.docs\u002F50.configuration","ri:settings-3-line",{"title":38,"path":39,"stem":40,"icon":41},"Database","\u002Fdocs\u002Fdatabase","1.docs\u002F50.database","ri:database-2-line",{"title":43,"path":44,"stem":45,"icon":46},"Lifecycle","\u002Fdocs\u002Flifecycle","1.docs\u002F50.lifecycle","i-lucide-layers",{"title":48,"path":49,"stem":50,"icon":51},"OpenAPI","\u002Fdocs\u002Fopenapi","1.docs\u002F50.openapi","ri:contract-line",{"title":53,"path":54,"stem":55,"icon":56},"Plugins","\u002Fdocs\u002Fplugins","1.docs\u002F50.plugins","ri:plug-line",{"title":58,"path":59,"stem":60,"icon":61},"Tasks","\u002Fdocs\u002Ftasks","1.docs\u002F50.tasks","codicon:run-all",{"title":63,"path":64,"stem":65,"icon":66},"WebSocket","\u002Fdocs\u002Fwebsocket","1.docs\u002F50.websocket","ri:broadcast-fill",{"title":68,"path":69,"stem":70,"icon":71},"Server Entry","\u002Fdocs\u002Fserver-entry","1.docs\u002F6.server-entry","ri:server-line",{"title":73,"path":74,"stem":75,"icon":76},"Cache","\u002Fdocs\u002Fcache","1.docs\u002F7.cache","ri:speed-line",{"title":78,"path":79,"stem":80,"icon":81},"KV Storage","\u002Fdocs\u002Fstorage","1.docs\u002F8.storage","carbon:datastore",{"title":83,"path":84,"stem":85,"icon":86},"Migration Guide","\u002Fdocs\u002Fmigration","1.docs\u002F99.migration","ri:arrow-right-up-line",{"title":88,"path":89,"stem":90,"icon":91},"Nightly Channel","\u002Fdocs\u002Fnightly","1.docs\u002F99.nightly","ri:moon-fill","i-lucide-book-open",{"title":94,"path":95,"stem":96,"children":97,"icon":99},"Deploy","\u002Fdeploy","2.deploy\u002F0.index",[98,100,121],{"title":94,"path":95,"stem":96,"icon":99},"ri:upload-cloud-2-line",{"title":101,"path":102,"stem":103,"children":104,"page":120},"Runtimes","\u002Fdeploy\u002Fruntimes","2.deploy\u002F10.runtimes",[105,110,115],{"title":106,"path":107,"stem":108,"icon":109},"Node.js","\u002Fdeploy\u002Fruntimes\u002Fnode","2.deploy\u002F10.runtimes\u002F1.node","akar-icons:node-fill",{"title":111,"path":112,"stem":113,"icon":114},"Bun","\u002Fdeploy\u002Fruntimes\u002Fbun","2.deploy\u002F10.runtimes\u002Fbun","simple-icons:bun",{"title":116,"path":117,"stem":118,"icon":119},"Deno","\u002Fdeploy\u002Fruntimes\u002Fdeno","2.deploy\u002F10.runtimes\u002Fdeno","simple-icons:deno",false,{"title":122,"path":123,"stem":124,"children":125,"page":120},"Providers","\u002Fdeploy\u002Fproviders","2.deploy\u002F20.providers",[126,130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222],{"title":127,"path":128,"stem":129},"Alwaysdata","\u002Fdeploy\u002Fproviders\u002Falwaysdata","2.deploy\u002F20.providers\u002Falwaysdata",{"title":131,"path":132,"stem":133},"AWS Lambda","\u002Fdeploy\u002Fproviders\u002Faws","2.deploy\u002F20.providers\u002Faws",{"title":135,"path":136,"stem":137},"AWS Amplify","\u002Fdeploy\u002Fproviders\u002Faws-amplify","2.deploy\u002F20.providers\u002Faws-amplify",{"title":139,"path":140,"stem":141},"Azure","\u002Fdeploy\u002Fproviders\u002Fazure","2.deploy\u002F20.providers\u002Fazure",{"title":143,"path":144,"stem":145},"Cleavr","\u002Fdeploy\u002Fproviders\u002Fcleavr","2.deploy\u002F20.providers\u002Fcleavr",{"title":147,"path":148,"stem":149},"Cloudflare","\u002Fdeploy\u002Fproviders\u002Fcloudflare","2.deploy\u002F20.providers\u002Fcloudflare",{"title":151,"path":152,"stem":153},"Deno Deploy","\u002Fdeploy\u002Fproviders\u002Fdeno-deploy","2.deploy\u002F20.providers\u002Fdeno-deploy",{"title":155,"path":156,"stem":157},"DigitalOcean","\u002Fdeploy\u002Fproviders\u002Fdigitalocean","2.deploy\u002F20.providers\u002Fdigitalocean",{"title":159,"path":160,"stem":161},"EdgeOne Pages","\u002Fdeploy\u002Fproviders\u002Fedgeone","2.deploy\u002F20.providers\u002Fedgeone",{"title":163,"path":164,"stem":165},"Firebase","\u002Fdeploy\u002Fproviders\u002Ffirebase","2.deploy\u002F20.providers\u002Ffirebase",{"title":167,"path":168,"stem":169},"Flightcontrol","\u002Fdeploy\u002Fproviders\u002Fflightcontrol","2.deploy\u002F20.providers\u002Fflightcontrol",{"title":171,"path":172,"stem":173},"Genezio","\u002Fdeploy\u002Fproviders\u002Fgenezio","2.deploy\u002F20.providers\u002Fgenezio",{"title":175,"path":176,"stem":177},"GitHub Pages","\u002Fdeploy\u002Fproviders\u002Fgithub-pages","2.deploy\u002F20.providers\u002Fgithub-pages",{"title":179,"path":180,"stem":181},"GitLab Pages","\u002Fdeploy\u002Fproviders\u002Fgitlab-pages","2.deploy\u002F20.providers\u002Fgitlab-pages",{"title":183,"path":184,"stem":185},"Heroku","\u002Fdeploy\u002Fproviders\u002Fheroku","2.deploy\u002F20.providers\u002Fheroku",{"title":187,"path":188,"stem":189},"IIS","\u002Fdeploy\u002Fproviders\u002Fiis","2.deploy\u002F20.providers\u002Fiis",{"title":191,"path":192,"stem":193},"Koyeb","\u002Fdeploy\u002Fproviders\u002Fkoyeb","2.deploy\u002F20.providers\u002Fkoyeb",{"title":195,"path":196,"stem":197},"Netlify","\u002Fdeploy\u002Fproviders\u002Fnetlify","2.deploy\u002F20.providers\u002Fnetlify",{"title":199,"path":200,"stem":201},"Platform.sh","\u002Fdeploy\u002Fproviders\u002Fplatform-sh","2.deploy\u002F20.providers\u002Fplatform-sh",{"title":203,"path":204,"stem":205},"Render.com","\u002Fdeploy\u002Fproviders\u002Frender","2.deploy\u002F20.providers\u002Frender",{"title":207,"path":208,"stem":209},"StormKit","\u002Fdeploy\u002Fproviders\u002Fstormkit","2.deploy\u002F20.providers\u002Fstormkit",{"title":211,"path":212,"stem":213},"Vercel","\u002Fdeploy\u002Fproviders\u002Fvercel","2.deploy\u002F20.providers\u002Fvercel",{"title":215,"path":216,"stem":217},"Zeabur","\u002Fdeploy\u002Fproviders\u002Fzeabur","2.deploy\u002F20.providers\u002Fzeabur",{"title":219,"path":220,"stem":221},"Zephyr Cloud","\u002Fdeploy\u002Fproviders\u002Fzephyr","2.deploy\u002F20.providers\u002Fzephyr",{"title":223,"path":224,"stem":225},"Zerops","\u002Fdeploy\u002Fproviders\u002Fzerops","2.deploy\u002F20.providers\u002Fzerops",{"title":227,"path":228,"stem":229,"children":230,"icon":36},"Config","\u002Fconfig","3.config\u002F0.index",[231],{"title":227,"path":228,"stem":229,"icon":36},{"title":233,"path":234,"stem":235,"children":236,"icon":238},"Examples","\u002Fexamples","4.examples\u002F0.index",[237,239,244,249,254,259,263,268,273,278,283,288,293,297,302,306,310,315,320,325,330,335,340,345,350,355,359,364,369,373,378,383],{"title":233,"path":234,"stem":235,"icon":238},"i-lucide-folder-code",{"title":240,"path":241,"stem":242,"icon":243},"API Routes","\u002Fexamples\u002Fapi-routes","4.examples\u002Fapi-routes","i-lucide-route",{"title":245,"path":246,"stem":247,"icon":248},"Auto Imports","\u002Fexamples\u002Fauto-imports","4.examples\u002Fauto-imports","i-lucide-import",{"title":250,"path":251,"stem":252,"icon":253},"Cached Handler","\u002Fexamples\u002Fcached-handler","4.examples\u002Fcached-handler","i-lucide-clock",{"title":255,"path":256,"stem":257,"icon":258},"Custom Error Handler","\u002Fexamples\u002Fcustom-error-handler","4.examples\u002Fcustom-error-handler","i-lucide-alert-circle",{"title":38,"path":260,"stem":261,"icon":262},"\u002Fexamples\u002Fdatabase","4.examples\u002Fdatabase","i-lucide-database",{"title":264,"path":265,"stem":266,"icon":267},"Elysia","\u002Fexamples\u002Felysia","4.examples\u002Felysia","i-skill-icons-elysia-dark",{"title":269,"path":270,"stem":271,"icon":272},"Express","\u002Fexamples\u002Fexpress","4.examples\u002Fexpress","i-simple-icons-express",{"title":274,"path":275,"stem":276,"icon":277},"Fastify","\u002Fexamples\u002Ffastify","4.examples\u002Ffastify","i-simple-icons-fastify",{"title":279,"path":280,"stem":281,"icon":282},"Hello World","\u002Fexamples\u002Fhello-world","4.examples\u002Fhello-world","i-lucide-sparkles",{"title":284,"path":285,"stem":286,"icon":287},"Hono","\u002Fexamples\u002Fhono","4.examples\u002Fhono","i-logos-hono",{"title":289,"path":290,"stem":291,"icon":292},"Import Alias","\u002Fexamples\u002Fimport-alias","4.examples\u002Fimport-alias","i-lucide-at-sign",{"title":294,"path":295,"stem":296,"icon":46},"Middleware","\u002Fexamples\u002Fmiddleware","4.examples\u002Fmiddleware",{"title":298,"path":299,"stem":300,"icon":301},"Mono JSX","\u002Fexamples\u002Fmono-jsx","4.examples\u002Fmono-jsx","i-lucide-brackets",{"title":303,"path":304,"stem":305,"icon":301},"Nano JSX","\u002Fexamples\u002Fnano-jsx","4.examples\u002Fnano-jsx",{"title":53,"path":307,"stem":308,"icon":309},"\u002Fexamples\u002Fplugins","4.examples\u002Fplugins","i-lucide-plug",{"title":311,"path":312,"stem":313,"icon":314},"Custom Renderer","\u002Fexamples\u002Frenderer","4.examples\u002Frenderer","i-lucide-code",{"title":316,"path":317,"stem":318,"icon":319},"Runtime Config","\u002Fexamples\u002Fruntime-config","4.examples\u002Fruntime-config","i-lucide-settings",{"title":321,"path":322,"stem":323,"icon":324},"Server Fetch","\u002Fexamples\u002Fserver-fetch","4.examples\u002Fserver-fetch","i-lucide-arrow-right-left",{"title":326,"path":327,"stem":328,"icon":329},"Shiki","\u002Fexamples\u002Fshiki","4.examples\u002Fshiki","i-lucide-highlighter",{"title":331,"path":332,"stem":333,"icon":334},"Virtual Routes","\u002Fexamples\u002Fvirtual-routes","4.examples\u002Fvirtual-routes","i-lucide-box",{"title":336,"path":337,"stem":338,"icon":339},"Vite Nitro Plugin","\u002Fexamples\u002Fvite-nitro-plugin","4.examples\u002Fvite-nitro-plugin","i-logos-vitejs",{"title":341,"path":342,"stem":343,"icon":344},"Vite RSC","\u002Fexamples\u002Fvite-rsc","4.examples\u002Fvite-rsc","i-logos-react",{"title":346,"path":347,"stem":348,"icon":349},"Vite SSR HTML","\u002Fexamples\u002Fvite-ssr-html","4.examples\u002Fvite-ssr-html","i-logos-html-5",{"title":351,"path":352,"stem":353,"icon":354},"SSR with Preact","\u002Fexamples\u002Fvite-ssr-preact","4.examples\u002Fvite-ssr-preact","i-logos-preact",{"title":356,"path":357,"stem":358,"icon":344},"SSR with React","\u002Fexamples\u002Fvite-ssr-react","4.examples\u002Fvite-ssr-react",{"title":360,"path":361,"stem":362,"icon":363},"SSR with SolidJS","\u002Fexamples\u002Fvite-ssr-solid","4.examples\u002Fvite-ssr-solid","i-logos-solidjs-icon",{"title":365,"path":366,"stem":367,"icon":368},"SSR with TanStack Router","\u002Fexamples\u002Fvite-ssr-tsr-react","4.examples\u002Fvite-ssr-tsr-react","i-simple-icons-tanstack",{"title":370,"path":371,"stem":372,"icon":368},"SSR with TanStack Start","\u002Fexamples\u002Fvite-ssr-tss-react","4.examples\u002Fvite-ssr-tss-react",{"title":374,"path":375,"stem":376,"icon":377},"SSR with Vue Router","\u002Fexamples\u002Fvite-ssr-vue-router","4.examples\u002Fvite-ssr-vue-router","i-logos-vue",{"title":379,"path":380,"stem":381,"icon":382},"Vite + tRPC","\u002Fexamples\u002Fvite-trpc","4.examples\u002Fvite-trpc","i-simple-icons-trpc",{"title":63,"path":384,"stem":385,"icon":386},"\u002Fexamples\u002Fwebsocket","4.examples\u002Fwebsocket","i-lucide-radio",{"title":388,"path":389,"stem":390,"children":391},"Blog","\u002Fblog","9.blog",[392,395],{"title":388,"path":389,"stem":393,"icon":394},"9.blog\u002Findex","i-lucide-file-text",{"title":396,"path":397,"stem":398,"icon":394},"Nitro v3 Beta is here!","\u002Fblog\u002Fv3-beta","9.blog\u002F1.v3-beta",{"title":5,"path":400,"stem":401},"\u002F","index",{"id":403,"title":83,"body":404,"description":5,"extension":1386,"meta":1387,"navigation":1388,"path":84,"seo":1389,"stem":85,"__hash__":1390},"content\u002F1.docs\u002F99.migration.md",{"type":405,"value":406,"toc":1365,"icon":86},"minimark",[407,414,417,429,444,461,545,550,565,569,576,591,595,604,613,617,634,638,644,649,664,668,678,681,685,692,696,699,702,881,885,891,894,898,923,927,930,962,968,972,991,995,1006,1011,1044,1063,1067,1078,1125,1128,1155,1159,1165,1200,1203,1226,1261,1265,1280,1298,1302,1327,1331,1346,1350,1361],[408,409,410],"note",{},[411,412,413],"p",{},"\nThis is a living document for migrating from Nitro 2 to 3. Please check it regularly while using the beta version.",[411,415,416],{},"Nitro v3 introduces intentional backward-incompatible changes. This guide helps you migrate from Nitro v2.",[418,419,421,425,426],"h2",{"id":420},"nitropack-is-renamed-to-nitro",[422,423,424],"code",{},"nitropack"," is renamed to ",[422,427,428],{},"nitro",[411,430,431,432,438,439,443],{},"The NPM package ",[433,434,424],"a",{"href":435,"rel":436},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fnitropack",[437],"nofollow"," (v2) has been renamed to ",[433,440,428],{"href":441,"rel":442},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fnitro",[437]," (v3).",[411,445,446,450,451,453,454,456,457,460],{},[447,448,449],"strong",{},"Migration:"," Update the ",[422,452,424],{}," dependency to ",[422,455,428],{}," in ",[422,458,459],{},"package.json",":",[462,463,464,514],"CodeGroup",{},[465,466,471],"pre",{"className":467,"code":468,"filename":469,"language":470,"meta":5,"style":5},"language-diff shiki shiki-themes github-light github-dark github-dark","{\n  \"dependencies\": {\n--    \"nitropack\": \"latest\"\n++    \"nitro\": \"latest\"\n  }\n}\n","release channel","diff",[422,472,473,482,488,495,502,508],{"__ignoreMap":5},[474,475,478],"span",{"class":476,"line":477},"line",1,[474,479,481],{"class":480},"slsVL","{\n",[474,483,485],{"class":476,"line":484},2,[474,486,487],{"class":480},"  \"dependencies\": {\n",[474,489,491],{"class":476,"line":490},3,[474,492,494],{"class":493},"sLpD_","--    \"nitropack\": \"latest\"\n",[474,496,498],{"class":476,"line":497},4,[474,499,501],{"class":500},"sByVh","++    \"nitro\": \"latest\"\n",[474,503,505],{"class":476,"line":504},5,[474,506,507],{"class":480},"  }\n",[474,509,511],{"class":476,"line":510},6,[474,512,513],{"class":480},"}\n",[465,515,518],{"className":467,"code":516,"filename":517,"language":470,"meta":5,"style":5},"{\n  \"dependencies\": {\n--    \"nitropack\": \"latest\"\n++    \"nitro\": \"npm:nitro-nightly\"\n  }\n}\n","nightly channel",[422,519,520,524,528,532,537,541],{"__ignoreMap":5},[474,521,522],{"class":476,"line":477},[474,523,481],{"class":480},[474,525,526],{"class":476,"line":484},[474,527,487],{"class":480},[474,529,530],{"class":476,"line":490},[474,531,494],{"class":493},[474,533,534],{"class":476,"line":497},[474,535,536],{"class":500},"++    \"nitro\": \"npm:nitro-nightly\"\n",[474,538,539],{"class":476,"line":504},[474,540,507],{"class":480},[474,542,543],{"class":476,"line":510},[474,544,513],{"class":480},[411,546,547,549],{},[447,548,449],{}," Search your codebase and rename all instances of nitropack to nitro:",[465,551,553],{"className":467,"code":552,"language":470,"meta":5,"style":5},"-- import { defineNitroConfig } from \"nitropack\u002Fconfig\"\n++ import { defineConfig } from \"nitro\"\n",[422,554,555,560],{"__ignoreMap":5},[474,556,557],{"class":476,"line":477},[474,558,559],{"class":493},"-- import { defineNitroConfig } from \"nitropack\u002Fconfig\"\n",[474,561,562],{"class":476,"line":484},[474,563,564],{"class":500},"++ import { defineConfig } from \"nitro\"\n",[418,566,568],{"id":567},"nitroruntime","nitro\u002Fruntime",[411,570,571,572,575],{},"Runtime utils had been moved to individual ",[422,573,574],{},"nitro\u002F*"," subpath exports. Refer to docs for usage.",[465,577,579],{"className":467,"code":578,"language":470,"meta":5,"style":5},"-- import { useStorage } from \"nitropack\u002Fruntime\u002Fstorage\"\n++ import { useStorage } from \"nitro\u002Fstorage\"\n",[422,580,581,586],{"__ignoreMap":5},[474,582,583],{"class":476,"line":477},[474,584,585],{"class":493},"-- import { useStorage } from \"nitropack\u002Fruntime\u002Fstorage\"\n",[474,587,588],{"class":476,"line":484},[474,589,590],{"class":500},"++ import { useStorage } from \"nitro\u002Fstorage\"\n",[418,592,594],{"id":593},"minimum-supported-nodejs-version-20","Minimum Supported Node.js Version: 20",[411,596,597,598,603],{},"Nitro now requires a minimum Node.js version of 20, as Node.js 18 reaches end-of-life in ",[433,599,602],{"href":600,"rel":601},"https:\u002F\u002Fnodejs.org\u002Fen\u002Fabout\u002Fprevious-releases",[437],"April 2025",".",[411,605,606,607,612],{},"Please upgrade to the ",[433,608,611],{"href":609,"rel":610},"https:\u002F\u002Fnodejs.org\u002Fen\u002Fdownload",[437],"latest LTS"," version (>= 20).",[411,614,615],{},[447,616,449],{},[618,619,620,628,631],"ul",{},[621,622,623,624,627],"li",{},"Check your local Node.js version using ",[422,625,626],{},"node --version"," and update if necessary.",[621,629,630],{},"If you use a CI\u002FCD system for deployment, ensure that your pipeline is running Node.js 20 or higher.",[621,632,633],{},"If your hosting provider manages the Node.js runtime, make sure it's set to version 20, 22, or later.",[418,635,637],{"id":636},"type-imports","Type Imports",[411,639,640,641,603],{},"Nitro types are now only exported from ",[422,642,643],{},"nitro\u002Ftypes",[411,645,646,648],{},[447,647,449],{}," Import types from nitro\u002Ftypes instead of nitro:",[465,650,652],{"className":467,"code":651,"language":470,"meta":5,"style":5},"-- import { NitroRuntimeConfig } from \"nitropack\"\n++ import { NitroRuntimeConfig } from \"nitro\u002Ftypes\"\n",[422,653,654,659],{"__ignoreMap":5},[474,655,656],{"class":476,"line":477},[474,657,658],{"class":493},"-- import { NitroRuntimeConfig } from \"nitropack\"\n",[474,660,661],{"class":476,"line":484},[474,662,663],{"class":500},"++ import { NitroRuntimeConfig } from \"nitro\u002Ftypes\"\n",[418,665,667],{"id":666},"app-config-support-removed","App Config Support Removed",[411,669,670,671,674,675,603],{},"Nitro v2 supported a bundled app config that allowed defining configurations in ",[422,672,673],{},"app.config.ts"," and accessing them at runtime via ",[422,676,677],{},"useAppConfig()",[411,679,680],{},"This feature had been removed.",[411,682,683],{},[447,684,449],{},[411,686,687,688,691],{},"Use a regular ",[422,689,690],{},".ts"," file in your server directory and import it directly.",[418,693,695],{"id":694},"preset-updates","Preset updates",[411,697,698],{},"Nitro presets have been updated for the latest compatibility.",[411,700,701],{},"Some (legacy) presets have been removed or renamed.",[703,704,705,718],"table",{},[706,707,708],"thead",{},[709,710,711,715],"tr",{},[712,713,714],"th",{},"Old Preset",[712,716,717],{},"New Preset",[719,720,721,739,758,771,787,800,815,827,839,851,861,871],"tbody",{},[709,722,723,729],{},[724,725,726],"td",{},[422,727,728],{},"node",[724,730,731,734,735,738],{},[422,732,733],{},"node_middleware"," (export changed to ",[422,736,737],{},"middleware",")",[709,740,741,753],{},[724,742,743,746,747,746,750],{},[422,744,745],{},"cloudflare",", ",[422,748,749],{},"cloudflare_worker",[422,751,752],{},"cloudflare_module_legacy",[724,754,755],{},[422,756,757],{},"cloudflare_module",[709,759,760,765],{},[724,761,762],{},[422,763,764],{},"deno-server-legacy",[724,766,767,770],{},[422,768,769],{},"deno_server"," with Deno v2",[709,772,773,778],{},[724,774,775],{},[422,776,777],{},"netlify-builder",[724,779,780,783,784],{},[422,781,782],{},"netlify"," or ",[422,785,786],{},"netlify_edge",[709,788,789,794],{},[724,790,791],{},[422,792,793],{},"vercel-edge",[724,795,796,799],{},[422,797,798],{},"vercel"," with Fluid compute enabled",[709,801,802,810],{},[724,803,804,746,807],{},[422,805,806],{},"azure",[422,808,809],{},"azure_functions",[724,811,812],{},[422,813,814],{},"azure_swa",[709,816,817,822],{},[724,818,819],{},[422,820,821],{},"firebase",[724,823,824],{},[422,825,826],{},"firebase_app_hosting",[709,828,829,834],{},[724,830,831],{},[422,832,833],{},"iis",[724,835,836],{},[422,837,838],{},"iis_handler",[709,840,841,846],{},[724,842,843],{},[422,844,845],{},"deno",[724,847,848],{},[422,849,850],{},"deno_deploy",[709,852,853,858],{},[724,854,855],{},[422,856,857],{},"edgio",[724,859,860],{},"Discontinued",[709,862,863,868],{},[724,864,865],{},[422,866,867],{},"cli",[724,869,870],{},"Removed due to lack of use",[709,872,873,878],{},[724,874,875],{},[422,876,877],{},"service_worker",[724,879,880],{},"Removed due to instability",[418,882,884],{"id":883},"cloudflare-bindings-access","Cloudflare Bindings Access",[411,886,887,888,603],{},"In Nitro v2, Cloudflare environment variables and bindings were accessible via ",[422,889,890],{},"event.context.cloudflare.env",[411,892,893],{},"In Nitro v3, the Cloudflare runtime context is attached to the request's runtime object instead.",[411,895,896],{},[447,897,449],{},[465,899,901],{"className":467,"code":900,"language":470,"meta":5,"style":5},"-- const { cloudflare } = event.context\n-- const binding = cloudflare.env.MY_BINDING\n++ const { env } = event.req.runtime.cloudflare\n++ const binding = env.MY_BINDING\n",[422,902,903,908,913,918],{"__ignoreMap":5},[474,904,905],{"class":476,"line":477},[474,906,907],{"class":493},"-- const { cloudflare } = event.context\n",[474,909,910],{"class":476,"line":484},[474,911,912],{"class":493},"-- const binding = cloudflare.env.MY_BINDING\n",[474,914,915],{"class":476,"line":490},[474,916,917],{"class":500},"++ const { env } = event.req.runtime.cloudflare\n",[474,919,920],{"class":476,"line":497},[474,921,922],{"class":500},"++ const binding = env.MY_BINDING\n",[418,924,926],{"id":925},"changed-nitro-subpath-imports","Changed nitro subpath imports",[411,928,929],{},"Nitro v2 introduced multiple subpath exports, some of which have been removed or updated:",[618,931,932,944,951,957],{},[621,933,934,746,937,940,941,738],{},[422,935,936],{},"nitro\u002Frollup",[422,938,939],{},"nitropack\u002Fcore"," (use ",[422,942,943],{},"nitro\u002Fbuilder",[621,945,946,940,949,738],{},[422,947,948],{},"nitropack\u002Fruntime\u002F*",[422,950,574],{},[621,952,953,956],{},[422,954,955],{},"nitropack\u002Fkit"," (removed)",[621,958,959,956],{},[422,960,961],{},"nitropack\u002Fpresets",[411,963,964,965,967],{},"An experimental ",[422,966,955],{}," was introduced but has now been removed. A standalone Nitro Kit package may be introduced in the future with clearer objectives.",[411,969,970],{},[447,971,449],{},[618,973,974,988],{},[621,975,976,977,980,981,983,984,987],{},"Use ",[422,978,979],{},"NitroModule"," from ",[422,982,643],{}," instead of ",[422,985,986],{},"defineNitroModule"," from the kit.",[621,989,990],{},"Prefer built-in Nitro presets (external presets are only for evaluation purposes).",[418,992,994],{"id":993},"h3-v2","H3 v2",[411,996,997,998,1002,1003,603],{},"Nitro v3 upgrades to ",[433,999,994],{"href":1000,"rel":1001},"https:\u002F\u002Fh3.dev",[437],", which includes API changes. All H3 utilities are imported from ",[422,1004,1005],{},"nitro\u002Fh3",[1007,1008,1010],"h3",{"id":1009},"web-standards","Web Standards",[411,1012,1013,1014,746,1021,746,1028,1035,1036,1043],{},"H3 v2 is rewritten based on web standard primitives (",[433,1015,1018],{"href":1016,"rel":1017},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FURL",[437],[422,1019,1020],{},"URL",[433,1022,1025],{"href":1023,"rel":1024},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FHeaders",[437],[422,1026,1027],{},"Headers",[433,1029,1032],{"href":1030,"rel":1031},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FRequest",[437],[422,1033,1034],{},"Request",", and ",[433,1037,1040],{"href":1038,"rel":1039},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FResponse",[437],[422,1041,1042],{},"Response",").",[411,1045,1046,1047,1050,1051,425,1054,1057,1058,1043],{},"Access to ",[422,1048,1049],{},"event.node.{req,res}"," is only available in Node.js runtime. ",[422,1052,1053],{},"event.web",[422,1055,1056],{},"event.req"," (instance of web ",[433,1059,1061],{"href":1030,"rel":1060},[437],[422,1062,1034],{},[1007,1064,1066],{"id":1065},"response-handling","Response Handling",[411,1068,1069,1070,1073,1074,1077],{},"You should always explicitly ",[447,1071,1072],{},"return"," the response body or ",[447,1075,1076],{},"throw"," an error:",[465,1079,1081],{"className":467,"code":1080,"language":470,"meta":5,"style":5},"-- import { send, sendRedirect, sendStream } from \"nitro\u002Fh3\"\n-- send(event, value)\n-- sendStream(event, stream)\n-- sendRedirect(event, location, code)\n++ import { redirect } from \"nitro\u002Fh3\"\n++ return value\n++ return stream\n++ return redirect(event, location, code)\n",[422,1082,1083,1088,1093,1098,1103,1108,1113,1119],{"__ignoreMap":5},[474,1084,1085],{"class":476,"line":477},[474,1086,1087],{"class":493},"-- import { send, sendRedirect, sendStream } from \"nitro\u002Fh3\"\n",[474,1089,1090],{"class":476,"line":484},[474,1091,1092],{"class":493},"-- send(event, value)\n",[474,1094,1095],{"class":476,"line":490},[474,1096,1097],{"class":493},"-- sendStream(event, stream)\n",[474,1099,1100],{"class":476,"line":497},[474,1101,1102],{"class":493},"-- sendRedirect(event, location, code)\n",[474,1104,1105],{"class":476,"line":504},[474,1106,1107],{"class":500},"++ import { redirect } from \"nitro\u002Fh3\"\n",[474,1109,1110],{"class":476,"line":510},[474,1111,1112],{"class":500},"++ return value\n",[474,1114,1116],{"class":476,"line":1115},7,[474,1117,1118],{"class":500},"++ return stream\n",[474,1120,1122],{"class":476,"line":1121},8,[474,1123,1124],{"class":500},"++ return redirect(event, location, code)\n",[411,1126,1127],{},"Other changes:",[618,1129,1130,1139,1147],{},[621,1131,1132,1135,1136],{},[422,1133,1134],{},"sendError(event, error)"," → ",[422,1137,1138],{},"throw createError(error)",[621,1140,1141,1135,1144],{},[422,1142,1143],{},"sendNoContent(event)",[422,1145,1146],{},"return noContent(event)",[621,1148,1149,1135,1152],{},[422,1150,1151],{},"sendProxy(event, target)",[422,1153,1154],{},"return proxy(event, target)",[1007,1156,1158],{"id":1157},"request-body","Request Body",[411,1160,1161,1162,1164],{},"Most body utilities can be replaced with native ",[422,1163,1056],{}," methods:",[465,1166,1168],{"className":467,"code":1167,"language":470,"meta":5,"style":5},"-- import { readBody, readRawBody, readFormData } from \"nitro\u002Fh3\"\n++ \u002F\u002F Use native Request methods\n++ const json = await event.req.json()\n++ const text = await event.req.text()\n++ const formData = await event.req.formData()\n++ const stream = event.req.body\n",[422,1169,1170,1175,1180,1185,1190,1195],{"__ignoreMap":5},[474,1171,1172],{"class":476,"line":477},[474,1173,1174],{"class":493},"-- import { readBody, readRawBody, readFormData } from \"nitro\u002Fh3\"\n",[474,1176,1177],{"class":476,"line":484},[474,1178,1179],{"class":500},"++ \u002F\u002F Use native Request methods\n",[474,1181,1182],{"class":476,"line":490},[474,1183,1184],{"class":500},"++ const json = await event.req.json()\n",[474,1186,1187],{"class":476,"line":497},[474,1188,1189],{"class":500},"++ const text = await event.req.text()\n",[474,1191,1192],{"class":476,"line":504},[474,1193,1194],{"class":500},"++ const formData = await event.req.formData()\n",[474,1196,1197],{"class":476,"line":510},[474,1198,1199],{"class":500},"++ const stream = event.req.body\n",[1007,1201,1027],{"id":1202},"headers",[411,1204,1205,1206,1211,1212,1215,1216,746,1219,1222,1223,1043],{},"H3 now uses standard web ",[433,1207,1209],{"href":1023,"rel":1208},[437],[422,1210,1027],{},". Header values are always plain ",[422,1213,1214],{},"string"," (no ",[422,1217,1218],{},"null",[422,1220,1221],{},"undefined",", or ",[422,1224,1225],{},"string[]",[465,1227,1229],{"className":467,"code":1228,"language":470,"meta":5,"style":5},"-- import { getHeader, setHeader, getResponseStatus } from \"nitro\u002Fh3\"\n-- getHeader(event, \"x-foo\")\n-- setHeader(event, \"x-foo\", \"bar\")\n++ event.req.headers.get(\"x-foo\")\n++ event.res.headers.set(\"x-foo\", \"bar\")\n++ event.res.status \u002F\u002F instead of getResponseStatus(event)\n",[422,1230,1231,1236,1241,1246,1251,1256],{"__ignoreMap":5},[474,1232,1233],{"class":476,"line":477},[474,1234,1235],{"class":493},"-- import { getHeader, setHeader, getResponseStatus } from \"nitro\u002Fh3\"\n",[474,1237,1238],{"class":476,"line":484},[474,1239,1240],{"class":493},"-- getHeader(event, \"x-foo\")\n",[474,1242,1243],{"class":476,"line":490},[474,1244,1245],{"class":493},"-- setHeader(event, \"x-foo\", \"bar\")\n",[474,1247,1248],{"class":476,"line":497},[474,1249,1250],{"class":500},"++ event.req.headers.get(\"x-foo\")\n",[474,1252,1253],{"class":476,"line":504},[474,1254,1255],{"class":500},"++ event.res.headers.set(\"x-foo\", \"bar\")\n",[474,1257,1258],{"class":476,"line":510},[474,1259,1260],{"class":500},"++ event.res.status \u002F\u002F instead of getResponseStatus(event)\n",[1007,1262,1264],{"id":1263},"handler-utils","Handler Utils",[465,1266,1268],{"className":467,"code":1267,"language":470,"meta":5,"style":5},"-- import { eventHandler, defineEventHandler } from \"nitro\u002Fh3\"\n++ import { defineHandler } from \"nitro\"\n",[422,1269,1270,1275],{"__ignoreMap":5},[474,1271,1272],{"class":476,"line":477},[474,1273,1274],{"class":493},"-- import { eventHandler, defineEventHandler } from \"nitro\u002Fh3\"\n",[474,1276,1277],{"class":476,"line":484},[474,1278,1279],{"class":500},"++ import { defineHandler } from \"nitro\"\n",[618,1281,1282,1290],{},[621,1283,1284,1135,1287],{},[422,1285,1286],{},"lazyEventHandler",[422,1288,1289],{},"defineLazyEventHandler",[621,1291,1292,1135,1295],{},[422,1293,1294],{},"useBase",[422,1296,1297],{},"withBase",[1007,1299,1301],{"id":1300},"error-utils","Error Utils",[465,1303,1305],{"className":467,"code":1304,"language":470,"meta":5,"style":5},"-- import { createError, isError } from \"nitro\u002Fh3\"\n++ import { HTTPError } from \"nitro\"\n++ throw new HTTPError({ status: 404, message: \"Not found\" })\n++ HTTPError.isError(error)\n",[422,1306,1307,1312,1317,1322],{"__ignoreMap":5},[474,1308,1309],{"class":476,"line":477},[474,1310,1311],{"class":493},"-- import { createError, isError } from \"nitro\u002Fh3\"\n",[474,1313,1314],{"class":476,"line":484},[474,1315,1316],{"class":500},"++ import { HTTPError } from \"nitro\"\n",[474,1318,1319],{"class":476,"line":490},[474,1320,1321],{"class":500},"++ throw new HTTPError({ status: 404, message: \"Not found\" })\n",[474,1323,1324],{"class":476,"line":497},[474,1325,1326],{"class":500},"++ HTTPError.isError(error)\n",[1007,1328,1330],{"id":1329},"nodejs-utils","Node.js Utils",[465,1332,1334],{"className":467,"code":1333,"language":470,"meta":5,"style":5},"-- import { defineNodeListener, fromNodeMiddleware, toNodeListener } from \"nitro\u002Fh3\"\n++ import { defineNodeHandler, fromNodeHandler, toNodeHandler } from \"nitro\u002Fh3\"\n",[422,1335,1336,1341],{"__ignoreMap":5},[474,1337,1338],{"class":476,"line":477},[474,1339,1340],{"class":493},"-- import { defineNodeListener, fromNodeMiddleware, toNodeListener } from \"nitro\u002Fh3\"\n",[474,1342,1343],{"class":476,"line":484},[474,1344,1345],{"class":500},"++ import { defineNodeHandler, fromNodeHandler, toNodeHandler } from \"nitro\u002Fh3\"\n",[418,1347,1349],{"id":1348},"optional-hooks","Optional Hooks",[411,1351,1352,1353,1356,1357,1360],{},"If you were using ",[422,1354,1355],{},"useNitroApp().hooks"," outside of Nitro plugins before, it might be undefined. Use new ",[422,1358,1359],{},"useNitroHooks()"," to guarantee having an instance.",[1362,1363,1364],"style",{},"html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sLpD_, html code.shiki .sLpD_{--shiki-light:#B31D28;--shiki-default:#FDAEB7;--shiki-dark:#FDAEB7}html pre.shiki code .sByVh, html code.shiki .sByVh{--shiki-light:#22863A;--shiki-default:#85E89D;--shiki-dark:#85E89D}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);}",{"title":5,"searchDepth":484,"depth":484,"links":1366},[1367,1369,1370,1371,1372,1373,1374,1375,1376,1385],{"id":420,"depth":484,"text":1368},"nitropack is renamed to nitro",{"id":567,"depth":484,"text":568},{"id":593,"depth":484,"text":594},{"id":636,"depth":484,"text":637},{"id":666,"depth":484,"text":667},{"id":694,"depth":484,"text":695},{"id":883,"depth":484,"text":884},{"id":925,"depth":484,"text":926},{"id":993,"depth":484,"text":994,"children":1377},[1378,1379,1380,1381,1382,1383,1384],{"id":1009,"depth":490,"text":1010},{"id":1065,"depth":490,"text":1066},{"id":1157,"depth":490,"text":1158},{"id":1202,"depth":490,"text":1027},{"id":1263,"depth":490,"text":1264},{"id":1300,"depth":490,"text":1301},{"id":1329,"depth":490,"text":1330},{"id":1348,"depth":484,"text":1349},"md",{"icon":86},{"icon":86},{"title":83,"description":5},"6uiYR53pzo-AMh8q43JyTiooolN8M_tMJ1WuHXNEOHI",[1392,1394],{"title":78,"path":79,"stem":80,"description":1393,"icon":81,"children":-1},"Nitro provides a built-in storage layer that can abstract filesystem or database or any other data source.",{"title":88,"path":89,"stem":90,"description":1395,"icon":91,"children":-1},"Nitro has a nightly release channel that automatically releases for every commit to main branch to try latest changes.",1776859220481]