[{"data":1,"prerenderedAt":1438},["ShallowReactive",2],{"navigation":3,"-docs-migration":402,"-docs-migration-surround":1433},[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":1428,"meta":1429,"navigation":1430,"path":84,"seo":1431,"stem":85,"__hash__":1432},"content\u002F1.docs\u002F99.migration.md",{"type":405,"value":406,"toc":1406,"icon":86},"minimark",[407,414,417,429,444,461,545,550,565,568,582,607,611,618,633,637,645,654,658,675,679,685,690,705,709,719,722,726,733,737,740,743,922,926,932,935,939,964,968,971,1003,1009,1013,1032,1036,1047,1052,1085,1104,1108,1119,1166,1169,1196,1200,1206,1241,1244,1267,1302,1306,1321,1339,1343,1368,1372,1387,1391,1402],[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,53],{"id":567},"plugins",[411,569,570,571,574,575,578,579,581],{},"The ",[422,572,573],{},"defineNitroPlugin"," utility has been renamed to ",[422,576,577],{},"definePlugin"," and is now imported from ",[422,580,428],{},".",[465,583,585],{"className":467,"code":584,"language":470,"meta":5,"style":5},"-- export default defineNitroPlugin((nitroApp) => {\n++ import { definePlugin } from \"nitro\"\n++\n++ export default definePlugin((nitroApp) => {\n",[422,586,587,592,597,602],{"__ignoreMap":5},[474,588,589],{"class":476,"line":477},[474,590,591],{"class":493},"-- export default defineNitroPlugin((nitroApp) => {\n",[474,593,594],{"class":476,"line":484},[474,595,596],{"class":500},"++ import { definePlugin } from \"nitro\"\n",[474,598,599],{"class":476,"line":490},[474,600,601],{"class":500},"++\n",[474,603,604],{"class":476,"line":497},[474,605,606],{"class":500},"++ export default definePlugin((nitroApp) => {\n",[418,608,610],{"id":609},"nitroruntime","nitro\u002Fruntime",[411,612,613,614,617],{},"Runtime utils had been moved to individual ",[422,615,616],{},"nitro\u002F*"," subpath exports. Refer to docs for usage.",[465,619,621],{"className":467,"code":620,"language":470,"meta":5,"style":5},"-- import { useStorage } from \"nitropack\u002Fruntime\u002Fstorage\"\n++ import { useStorage } from \"nitro\u002Fstorage\"\n",[422,622,623,628],{"__ignoreMap":5},[474,624,625],{"class":476,"line":477},[474,626,627],{"class":493},"-- import { useStorage } from \"nitropack\u002Fruntime\u002Fstorage\"\n",[474,629,630],{"class":476,"line":484},[474,631,632],{"class":500},"++ import { useStorage } from \"nitro\u002Fstorage\"\n",[418,634,636],{"id":635},"minimum-supported-nodejs-version-20","Minimum Supported Node.js Version: 20",[411,638,639,640,581],{},"Nitro now requires a minimum Node.js version of 20, as Node.js 18 reaches end-of-life in ",[433,641,644],{"href":642,"rel":643},"https:\u002F\u002Fnodejs.org\u002Fen\u002Fabout\u002Fprevious-releases",[437],"April 2025",[411,646,647,648,653],{},"Please upgrade to the ",[433,649,652],{"href":650,"rel":651},"https:\u002F\u002Fnodejs.org\u002Fen\u002Fdownload",[437],"latest LTS"," version (>= 20).",[411,655,656],{},[447,657,449],{},[659,660,661,669,672],"ul",{},[662,663,664,665,668],"li",{},"Check your local Node.js version using ",[422,666,667],{},"node --version"," and update if necessary.",[662,670,671],{},"If you use a CI\u002FCD system for deployment, ensure that your pipeline is running Node.js 20 or higher.",[662,673,674],{},"If your hosting provider manages the Node.js runtime, make sure it's set to version 20, 22, or later.",[418,676,678],{"id":677},"type-imports","Type Imports",[411,680,681,682,581],{},"Nitro types are now only exported from ",[422,683,684],{},"nitro\u002Ftypes",[411,686,687,689],{},[447,688,449],{}," Import types from nitro\u002Ftypes instead of nitro:",[465,691,693],{"className":467,"code":692,"language":470,"meta":5,"style":5},"-- import { NitroRuntimeConfig } from \"nitropack\"\n++ import { NitroRuntimeConfig } from \"nitro\u002Ftypes\"\n",[422,694,695,700],{"__ignoreMap":5},[474,696,697],{"class":476,"line":477},[474,698,699],{"class":493},"-- import { NitroRuntimeConfig } from \"nitropack\"\n",[474,701,702],{"class":476,"line":484},[474,703,704],{"class":500},"++ import { NitroRuntimeConfig } from \"nitro\u002Ftypes\"\n",[418,706,708],{"id":707},"app-config-support-removed","App Config Support Removed",[411,710,711,712,715,716,581],{},"Nitro v2 supported a bundled app config that allowed defining configurations in ",[422,713,714],{},"app.config.ts"," and accessing them at runtime via ",[422,717,718],{},"useAppConfig()",[411,720,721],{},"This feature had been removed.",[411,723,724],{},[447,725,449],{},[411,727,728,729,732],{},"Use a regular ",[422,730,731],{},".ts"," file in your server directory and import it directly.",[418,734,736],{"id":735},"preset-updates","Preset updates",[411,738,739],{},"Nitro presets have been updated for the latest compatibility.",[411,741,742],{},"Some (legacy) presets have been removed or renamed.",[744,745,746,759],"table",{},[747,748,749],"thead",{},[750,751,752,756],"tr",{},[753,754,755],"th",{},"Old Preset",[753,757,758],{},"New Preset",[760,761,762,780,799,812,828,841,856,868,880,892,902,912],"tbody",{},[750,763,764,770],{},[765,766,767],"td",{},[422,768,769],{},"node",[765,771,772,775,776,779],{},[422,773,774],{},"node_middleware"," (export changed to ",[422,777,778],{},"middleware",")",[750,781,782,794],{},[765,783,784,787,788,787,791],{},[422,785,786],{},"cloudflare",", ",[422,789,790],{},"cloudflare_worker",[422,792,793],{},"cloudflare_module_legacy",[765,795,796],{},[422,797,798],{},"cloudflare_module",[750,800,801,806],{},[765,802,803],{},[422,804,805],{},"deno-server-legacy",[765,807,808,811],{},[422,809,810],{},"deno_server"," with Deno v2",[750,813,814,819],{},[765,815,816],{},[422,817,818],{},"netlify-builder",[765,820,821,824,825],{},[422,822,823],{},"netlify"," or ",[422,826,827],{},"netlify_edge",[750,829,830,835],{},[765,831,832],{},[422,833,834],{},"vercel-edge",[765,836,837,840],{},[422,838,839],{},"vercel"," with Fluid compute enabled",[750,842,843,851],{},[765,844,845,787,848],{},[422,846,847],{},"azure",[422,849,850],{},"azure_functions",[765,852,853],{},[422,854,855],{},"azure_swa",[750,857,858,863],{},[765,859,860],{},[422,861,862],{},"firebase",[765,864,865],{},[422,866,867],{},"firebase_app_hosting",[750,869,870,875],{},[765,871,872],{},[422,873,874],{},"iis",[765,876,877],{},[422,878,879],{},"iis_handler",[750,881,882,887],{},[765,883,884],{},[422,885,886],{},"deno",[765,888,889],{},[422,890,891],{},"deno_deploy",[750,893,894,899],{},[765,895,896],{},[422,897,898],{},"edgio",[765,900,901],{},"Discontinued",[750,903,904,909],{},[765,905,906],{},[422,907,908],{},"cli",[765,910,911],{},"Removed due to lack of use",[750,913,914,919],{},[765,915,916],{},[422,917,918],{},"service_worker",[765,920,921],{},"Removed due to instability",[418,923,925],{"id":924},"cloudflare-bindings-access","Cloudflare Bindings Access",[411,927,928,929,581],{},"In Nitro v2, Cloudflare environment variables and bindings were accessible via ",[422,930,931],{},"event.context.cloudflare.env",[411,933,934],{},"In Nitro v3, the Cloudflare runtime context is attached to the request's runtime object instead.",[411,936,937],{},[447,938,449],{},[465,940,942],{"className":467,"code":941,"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,943,944,949,954,959],{"__ignoreMap":5},[474,945,946],{"class":476,"line":477},[474,947,948],{"class":493},"-- const { cloudflare } = event.context\n",[474,950,951],{"class":476,"line":484},[474,952,953],{"class":493},"-- const binding = cloudflare.env.MY_BINDING\n",[474,955,956],{"class":476,"line":490},[474,957,958],{"class":500},"++ const { env } = event.req.runtime.cloudflare\n",[474,960,961],{"class":476,"line":497},[474,962,963],{"class":500},"++ const binding = env.MY_BINDING\n",[418,965,967],{"id":966},"changed-nitro-subpath-imports","Changed nitro subpath imports",[411,969,970],{},"Nitro v2 introduced multiple subpath exports, some of which have been removed or updated:",[659,972,973,985,992,998],{},[662,974,975,787,978,981,982,779],{},[422,976,977],{},"nitro\u002Frollup",[422,979,980],{},"nitropack\u002Fcore"," (use ",[422,983,984],{},"nitro\u002Fbuilder",[662,986,987,981,990,779],{},[422,988,989],{},"nitropack\u002Fruntime\u002F*",[422,991,616],{},[662,993,994,997],{},[422,995,996],{},"nitropack\u002Fkit"," (removed)",[662,999,1000,997],{},[422,1001,1002],{},"nitropack\u002Fpresets",[411,1004,1005,1006,1008],{},"An experimental ",[422,1007,996],{}," was introduced but has now been removed. A standalone Nitro Kit package may be introduced in the future with clearer objectives.",[411,1010,1011],{},[447,1012,449],{},[659,1014,1015,1029],{},[662,1016,1017,1018,1021,1022,1024,1025,1028],{},"Use ",[422,1019,1020],{},"NitroModule"," from ",[422,1023,684],{}," instead of ",[422,1026,1027],{},"defineNitroModule"," from the kit.",[662,1030,1031],{},"Prefer built-in Nitro presets (external presets are only for evaluation purposes).",[418,1033,1035],{"id":1034},"h3-v2","H3 v2",[411,1037,1038,1039,1043,1044,581],{},"Nitro v3 upgrades to ",[433,1040,1035],{"href":1041,"rel":1042},"https:\u002F\u002Fh3.dev",[437],", which includes API changes. All H3 utilities are imported from ",[422,1045,1046],{},"nitro\u002Fh3",[1048,1049,1051],"h3",{"id":1050},"web-standards","Web Standards",[411,1053,1054,1055,787,1062,787,1069,1076,1077,1084],{},"H3 v2 is rewritten based on web standard primitives (",[433,1056,1059],{"href":1057,"rel":1058},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FURL",[437],[422,1060,1061],{},"URL",[433,1063,1066],{"href":1064,"rel":1065},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FHeaders",[437],[422,1067,1068],{},"Headers",[433,1070,1073],{"href":1071,"rel":1072},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FRequest",[437],[422,1074,1075],{},"Request",", and ",[433,1078,1081],{"href":1079,"rel":1080},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FResponse",[437],[422,1082,1083],{},"Response",").",[411,1086,1087,1088,1091,1092,425,1095,1098,1099,1084],{},"Access to ",[422,1089,1090],{},"event.node.{req,res}"," is only available in Node.js runtime. ",[422,1093,1094],{},"event.web",[422,1096,1097],{},"event.req"," (instance of web ",[433,1100,1102],{"href":1071,"rel":1101},[437],[422,1103,1075],{},[1048,1105,1107],{"id":1106},"response-handling","Response Handling",[411,1109,1110,1111,1114,1115,1118],{},"You should always explicitly ",[447,1112,1113],{},"return"," the response body or ",[447,1116,1117],{},"throw"," an error:",[465,1120,1122],{"className":467,"code":1121,"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,1123,1124,1129,1134,1139,1144,1149,1154,1160],{"__ignoreMap":5},[474,1125,1126],{"class":476,"line":477},[474,1127,1128],{"class":493},"-- import { send, sendRedirect, sendStream } from \"nitro\u002Fh3\"\n",[474,1130,1131],{"class":476,"line":484},[474,1132,1133],{"class":493},"-- send(event, value)\n",[474,1135,1136],{"class":476,"line":490},[474,1137,1138],{"class":493},"-- sendStream(event, stream)\n",[474,1140,1141],{"class":476,"line":497},[474,1142,1143],{"class":493},"-- sendRedirect(event, location, code)\n",[474,1145,1146],{"class":476,"line":504},[474,1147,1148],{"class":500},"++ import { redirect } from \"nitro\u002Fh3\"\n",[474,1150,1151],{"class":476,"line":510},[474,1152,1153],{"class":500},"++ return value\n",[474,1155,1157],{"class":476,"line":1156},7,[474,1158,1159],{"class":500},"++ return stream\n",[474,1161,1163],{"class":476,"line":1162},8,[474,1164,1165],{"class":500},"++ return redirect(event, location, code)\n",[411,1167,1168],{},"Other changes:",[659,1170,1171,1180,1188],{},[662,1172,1173,1176,1177],{},[422,1174,1175],{},"sendError(event, error)"," → ",[422,1178,1179],{},"throw createError(error)",[662,1181,1182,1176,1185],{},[422,1183,1184],{},"sendNoContent(event)",[422,1186,1187],{},"return noContent(event)",[662,1189,1190,1176,1193],{},[422,1191,1192],{},"sendProxy(event, target)",[422,1194,1195],{},"return proxy(event, target)",[1048,1197,1199],{"id":1198},"request-body","Request Body",[411,1201,1202,1203,1205],{},"Most body utilities can be replaced with native ",[422,1204,1097],{}," methods:",[465,1207,1209],{"className":467,"code":1208,"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,1210,1211,1216,1221,1226,1231,1236],{"__ignoreMap":5},[474,1212,1213],{"class":476,"line":477},[474,1214,1215],{"class":493},"-- import { readBody, readRawBody, readFormData } from \"nitro\u002Fh3\"\n",[474,1217,1218],{"class":476,"line":484},[474,1219,1220],{"class":500},"++ \u002F\u002F Use native Request methods\n",[474,1222,1223],{"class":476,"line":490},[474,1224,1225],{"class":500},"++ const json = await event.req.json()\n",[474,1227,1228],{"class":476,"line":497},[474,1229,1230],{"class":500},"++ const text = await event.req.text()\n",[474,1232,1233],{"class":476,"line":504},[474,1234,1235],{"class":500},"++ const formData = await event.req.formData()\n",[474,1237,1238],{"class":476,"line":510},[474,1239,1240],{"class":500},"++ const stream = event.req.body\n",[1048,1242,1068],{"id":1243},"headers",[411,1245,1246,1247,1252,1253,1256,1257,787,1260,1263,1264,1084],{},"H3 now uses standard web ",[433,1248,1250],{"href":1064,"rel":1249},[437],[422,1251,1068],{},". Header values are always plain ",[422,1254,1255],{},"string"," (no ",[422,1258,1259],{},"null",[422,1261,1262],{},"undefined",", or ",[422,1265,1266],{},"string[]",[465,1268,1270],{"className":467,"code":1269,"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,1271,1272,1277,1282,1287,1292,1297],{"__ignoreMap":5},[474,1273,1274],{"class":476,"line":477},[474,1275,1276],{"class":493},"-- import { getHeader, setHeader, getResponseStatus } from \"nitro\u002Fh3\"\n",[474,1278,1279],{"class":476,"line":484},[474,1280,1281],{"class":493},"-- getHeader(event, \"x-foo\")\n",[474,1283,1284],{"class":476,"line":490},[474,1285,1286],{"class":493},"-- setHeader(event, \"x-foo\", \"bar\")\n",[474,1288,1289],{"class":476,"line":497},[474,1290,1291],{"class":500},"++ event.req.headers.get(\"x-foo\")\n",[474,1293,1294],{"class":476,"line":504},[474,1295,1296],{"class":500},"++ event.res.headers.set(\"x-foo\", \"bar\")\n",[474,1298,1299],{"class":476,"line":510},[474,1300,1301],{"class":500},"++ event.res.status \u002F\u002F instead of getResponseStatus(event)\n",[1048,1303,1305],{"id":1304},"handler-utils","Handler Utils",[465,1307,1309],{"className":467,"code":1308,"language":470,"meta":5,"style":5},"-- import { eventHandler, defineEventHandler } from \"nitro\u002Fh3\"\n++ import { defineHandler } from \"nitro\"\n",[422,1310,1311,1316],{"__ignoreMap":5},[474,1312,1313],{"class":476,"line":477},[474,1314,1315],{"class":493},"-- import { eventHandler, defineEventHandler } from \"nitro\u002Fh3\"\n",[474,1317,1318],{"class":476,"line":484},[474,1319,1320],{"class":500},"++ import { defineHandler } from \"nitro\"\n",[659,1322,1323,1331],{},[662,1324,1325,1176,1328],{},[422,1326,1327],{},"lazyEventHandler",[422,1329,1330],{},"defineLazyEventHandler",[662,1332,1333,1176,1336],{},[422,1334,1335],{},"useBase",[422,1337,1338],{},"withBase",[1048,1340,1342],{"id":1341},"error-utils","Error Utils",[465,1344,1346],{"className":467,"code":1345,"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,1347,1348,1353,1358,1363],{"__ignoreMap":5},[474,1349,1350],{"class":476,"line":477},[474,1351,1352],{"class":493},"-- import { createError, isError } from \"nitro\u002Fh3\"\n",[474,1354,1355],{"class":476,"line":484},[474,1356,1357],{"class":500},"++ import { HTTPError } from \"nitro\"\n",[474,1359,1360],{"class":476,"line":490},[474,1361,1362],{"class":500},"++ throw new HTTPError({ status: 404, message: \"Not found\" })\n",[474,1364,1365],{"class":476,"line":497},[474,1366,1367],{"class":500},"++ HTTPError.isError(error)\n",[1048,1369,1371],{"id":1370},"nodejs-utils","Node.js Utils",[465,1373,1375],{"className":467,"code":1374,"language":470,"meta":5,"style":5},"-- import { defineNodeListener, fromNodeMiddleware, toNodeListener } from \"nitro\u002Fh3\"\n++ import { defineNodeHandler, fromNodeHandler, toNodeHandler } from \"nitro\u002Fh3\"\n",[422,1376,1377,1382],{"__ignoreMap":5},[474,1378,1379],{"class":476,"line":477},[474,1380,1381],{"class":493},"-- import { defineNodeListener, fromNodeMiddleware, toNodeListener } from \"nitro\u002Fh3\"\n",[474,1383,1384],{"class":476,"line":484},[474,1385,1386],{"class":500},"++ import { defineNodeHandler, fromNodeHandler, toNodeHandler } from \"nitro\u002Fh3\"\n",[418,1388,1390],{"id":1389},"optional-hooks","Optional Hooks",[411,1392,1393,1394,1397,1398,1401],{},"If you were using ",[422,1395,1396],{},"useNitroApp().hooks"," outside of Nitro plugins before, it might be undefined. Use new ",[422,1399,1400],{},"useNitroHooks()"," to guarantee having an instance.",[1403,1404,1405],"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":1407},[1408,1410,1411,1412,1413,1414,1415,1416,1417,1418,1427],{"id":420,"depth":484,"text":1409},"nitropack is renamed to nitro",{"id":567,"depth":484,"text":53},{"id":609,"depth":484,"text":610},{"id":635,"depth":484,"text":636},{"id":677,"depth":484,"text":678},{"id":707,"depth":484,"text":708},{"id":735,"depth":484,"text":736},{"id":924,"depth":484,"text":925},{"id":966,"depth":484,"text":967},{"id":1034,"depth":484,"text":1035,"children":1419},[1420,1421,1422,1423,1424,1425,1426],{"id":1050,"depth":490,"text":1051},{"id":1106,"depth":490,"text":1107},{"id":1198,"depth":490,"text":1199},{"id":1243,"depth":490,"text":1068},{"id":1304,"depth":490,"text":1305},{"id":1341,"depth":490,"text":1342},{"id":1370,"depth":490,"text":1371},{"id":1389,"depth":484,"text":1390},"md",{"icon":86},{"icon":86},{"title":83,"description":5},"Xe7Cupi253holLOyyPP6tttjNp2ewB1iBaMvK4QMdhI",[1434,1436],{"title":78,"path":79,"stem":80,"description":1435,"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":1437,"icon":91,"children":-1},"Nitro has a nightly release channel that automatically releases for every commit to main branch to try latest changes.",1783014574008]