[{"data":1,"prerenderedAt":1626},["ShallowReactive",2],{"navigation":3,"-blog-v3-beta":394},[4,88,217,223,379,391],{"title":5,"path":6,"stem":7,"children":8,"icon":87},"","/docs","1.docs/1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82],{"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},"OpenAPI","/docs/openapi","1.docs/50.openapi","ri:contract-line",{"title":53,"path":54,"stem":55,"icon":56},"Plugins","/docs/plugins","1.docs/50.plugins","ri:plug-line",{"title":58,"path":59,"stem":60,"icon":61},"Tasks","/docs/tasks","1.docs/50.tasks","codicon:run-all",{"title":63,"path":64,"stem":65,"icon":66},"Server Entry","/docs/server-entry","1.docs/6.server-entry","ri:server-line",{"title":68,"path":69,"stem":70,"icon":71},"Cache","/docs/cache","1.docs/7.cache","ri:speed-line",{"title":73,"path":74,"stem":75,"icon":76},"KV Storage","/docs/storage","1.docs/8.storage","carbon:datastore",{"title":78,"path":79,"stem":80,"icon":81},"Migration Guide","/docs/migration","1.docs/99.migration","ri:arrow-right-up-line",{"title":83,"path":84,"stem":85,"icon":86},"Nightly Channel","/docs/nightly","1.docs/99.nightly","ri:moon-fill","i-lucide-book-open",{"title":89,"path":90,"stem":91,"children":92,"icon":94},"Deploy","/deploy","2.deploy/0.index",[93,95,116],{"title":89,"path":90,"stem":91,"icon":94},"ri:upload-cloud-2-line",{"title":96,"path":97,"stem":98,"children":99,"page":115},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[100,105,110],{"title":101,"path":102,"stem":103,"icon":104},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":106,"path":107,"stem":108,"icon":109},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":111,"path":112,"stem":113,"icon":114},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":117,"path":118,"stem":119,"children":120,"page":115},"Providers","/deploy/providers","2.deploy/20.providers",[121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,193,197,201,205,209,213],{"title":122,"path":123,"stem":124},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":126,"path":127,"stem":128},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":130,"path":131,"stem":132},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":134,"path":135,"stem":136},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":138,"path":139,"stem":140},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":142,"path":143,"stem":144},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":146,"path":147,"stem":148},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":150,"path":151,"stem":152},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":154,"path":155,"stem":156},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":158,"path":159,"stem":160},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":162,"path":163,"stem":164},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":166,"path":167,"stem":168},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":170,"path":171,"stem":172},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":174,"path":175,"stem":176},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":178,"path":179,"stem":180},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":182,"path":183,"stem":184},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":186,"path":187,"stem":188},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":190,"path":191,"stem":192},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":194,"path":195,"stem":196},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":198,"path":199,"stem":200},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":202,"path":203,"stem":204},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":206,"path":207,"stem":208},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":210,"path":211,"stem":212},"Zephyr Cloud","/deploy/providers/zephyr","2.deploy/20.providers/zephyr",{"title":214,"path":215,"stem":216},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":218,"path":219,"stem":220,"children":221,"icon":36},"Config","/config","3.config/0.index",[222],{"title":218,"path":219,"stem":220,"icon":36},{"title":224,"path":225,"stem":226,"children":227,"icon":229},"Examples","/examples","4.examples/0.index",[228,230,235,240,245,250,254,259,264,269,274,279,284,288,293,297,301,306,311,316,321,326,331,336,341,346,350,355,360,364,369,374],{"title":224,"path":225,"stem":226,"icon":229},"i-lucide-folder-code",{"title":231,"path":232,"stem":233,"icon":234},"API Routes","/examples/api-routes","4.examples/api-routes","i-lucide-route",{"title":236,"path":237,"stem":238,"icon":239},"Auto Imports","/examples/auto-imports","4.examples/auto-imports","i-lucide-import",{"title":241,"path":242,"stem":243,"icon":244},"Cached Handler","/examples/cached-handler","4.examples/cached-handler","i-lucide-clock",{"title":246,"path":247,"stem":248,"icon":249},"Custom Error Handler","/examples/custom-error-handler","4.examples/custom-error-handler","i-lucide-alert-circle",{"title":38,"path":251,"stem":252,"icon":253},"/examples/database","4.examples/database","i-lucide-database",{"title":255,"path":256,"stem":257,"icon":258},"Elysia","/examples/elysia","4.examples/elysia","i-skill-icons-elysia-dark",{"title":260,"path":261,"stem":262,"icon":263},"Express","/examples/express","4.examples/express","i-simple-icons-express",{"title":265,"path":266,"stem":267,"icon":268},"Fastify","/examples/fastify","4.examples/fastify","i-simple-icons-fastify",{"title":270,"path":271,"stem":272,"icon":273},"Hello World","/examples/hello-world","4.examples/hello-world","i-lucide-sparkles",{"title":275,"path":276,"stem":277,"icon":278},"Hono","/examples/hono","4.examples/hono","i-logos-hono",{"title":280,"path":281,"stem":282,"icon":283},"Import Alias","/examples/import-alias","4.examples/import-alias","i-lucide-at-sign",{"title":285,"path":286,"stem":287,"icon":46},"Middleware","/examples/middleware","4.examples/middleware",{"title":289,"path":290,"stem":291,"icon":292},"Mono JSX","/examples/mono-jsx","4.examples/mono-jsx","i-lucide-brackets",{"title":294,"path":295,"stem":296,"icon":292},"Nano JSX","/examples/nano-jsx","4.examples/nano-jsx",{"title":53,"path":298,"stem":299,"icon":300},"/examples/plugins","4.examples/plugins","i-lucide-plug",{"title":302,"path":303,"stem":304,"icon":305},"Custom Renderer","/examples/renderer","4.examples/renderer","i-lucide-code",{"title":307,"path":308,"stem":309,"icon":310},"Runtime Config","/examples/runtime-config","4.examples/runtime-config","i-lucide-settings",{"title":312,"path":313,"stem":314,"icon":315},"Server Fetch","/examples/server-fetch","4.examples/server-fetch","i-lucide-arrow-right-left",{"title":317,"path":318,"stem":319,"icon":320},"Shiki","/examples/shiki","4.examples/shiki","i-lucide-highlighter",{"title":322,"path":323,"stem":324,"icon":325},"Virtual Routes","/examples/virtual-routes","4.examples/virtual-routes","i-lucide-box",{"title":327,"path":328,"stem":329,"icon":330},"Vite Nitro Plugin","/examples/vite-nitro-plugin","4.examples/vite-nitro-plugin","i-logos-vitejs",{"title":332,"path":333,"stem":334,"icon":335},"Vite RSC","/examples/vite-rsc","4.examples/vite-rsc","i-logos-react",{"title":337,"path":338,"stem":339,"icon":340},"Vite SSR HTML","/examples/vite-ssr-html","4.examples/vite-ssr-html","i-logos-html-5",{"title":342,"path":343,"stem":344,"icon":345},"SSR with Preact","/examples/vite-ssr-preact","4.examples/vite-ssr-preact","i-logos-preact",{"title":347,"path":348,"stem":349,"icon":335},"SSR with React","/examples/vite-ssr-react","4.examples/vite-ssr-react",{"title":351,"path":352,"stem":353,"icon":354},"SSR with SolidJS","/examples/vite-ssr-solid","4.examples/vite-ssr-solid","i-logos-solidjs-icon",{"title":356,"path":357,"stem":358,"icon":359},"SSR with TanStack Router","/examples/vite-ssr-tsr-react","4.examples/vite-ssr-tsr-react","i-simple-icons-tanstack",{"title":361,"path":362,"stem":363,"icon":359},"SSR with TanStack Start","/examples/vite-ssr-tss-react","4.examples/vite-ssr-tss-react",{"title":365,"path":366,"stem":367,"icon":368},"SSR with Vue Router","/examples/vite-ssr-vue-router","4.examples/vite-ssr-vue-router","i-logos-vue",{"title":370,"path":371,"stem":372,"icon":373},"Vite + tRPC","/examples/vite-trpc","4.examples/vite-trpc","i-simple-icons-trpc",{"title":375,"path":376,"stem":377,"icon":378},"WebSocket","/examples/websocket","4.examples/websocket","i-lucide-radio",{"title":380,"path":381,"stem":382,"children":383},"Blog","/blog","9.blog",[384,387],{"title":380,"path":381,"stem":385,"icon":386},"9.blog/index","i-lucide-file-text",{"title":388,"path":389,"stem":390,"icon":386},"Nitro v3 Beta is here!","/blog/v3-beta","9.blog/1.v3-beta",{"title":5,"path":392,"stem":393},"/","index",{"id":395,"title":388,"body":396,"description":1614,"extension":1615,"meta":1616,"navigation":1623,"path":389,"seo":1624,"stem":390,"__hash__":1625},"content/9.blog/1.v3-beta.md",{"type":397,"value":398,"toc":1592,"icon":386},"minimark",[399,404,416,431,470,478,482,507,510,525,531,535,543,632,639,669,685,689,692,714,728,734,747,754,815,822,826,833,931,935,973,976,1061,1064,1141,1144,1159,1163,1170,1187,1191,1200,1260,1263,1267,1270,1337,1339,1342,1350,1407,1409,1413,1419,1432,1435,1439,1442,1445,1447,1451,1458,1466,1475,1479,1483,1487,1494,1498,1501,1558,1564,1567,1570,1588],[400,401,403],"h2",{"id":402},"a-brief-history","A Brief History",[405,406,407,408,415],"p",{},"Nitro started as the server engine for ",[409,410,414],"a",{"href":411,"rel":412},"https://nuxt.com",[413],"nofollow","Nuxt 3",", designed to solve a specific problem: deployment-agnostic servers.\nOver time, Nitro grew beyond Nuxt. It became the foundation for many meta-frameworks and a toolkit for building standalone servers.",[405,417,418,419,424,425,430],{},"With Nitro v3, we took the opportunity to rethink the fundamentals. leaner APIs, Web standards, first-class ",[409,420,423],{"href":421,"rel":422},"https://rolldown.rs/",[413],"Rolldown"," and ",[409,426,429],{"href":427,"rel":428},"https://vite.dev/",[413],"Vite v8"," integration, and a better experience for both humans and agents (more on that later!)",[405,432,433,434,439,440,445,446,451,452,457,458,463,464,469],{},"Since we quietly announced v3 ",[409,435,438],{"href":436,"rel":437},"https://github.com/nitrojs/nitro/releases/tag/v3.0.1-alpha.0",[413],"alpha.0"," (11 Oct 2025) at the first ",[409,441,444],{"href":442,"rel":443},"https://viteconf.amsterdam/",[413],"Vite Conf",", Nitro v3 has been adopted by many users (",[409,447,450],{"href":448,"rel":449},"https://npmtrends.com/nitro-vs-nitro-nightly",[413],"~280k"," weekly downloads!) and refined through amazing contributions and feedback. including ",[409,453,456],{"href":454,"rel":455},"https://tanstack.com/start/latest/docs/framework/react/guide/hosting#nitro",[413],"Tanstack Start",", ",[409,459,462],{"href":460,"rel":461},"https://useworkflow.dev/docs/getting-started",[413],"Vercel Workflows",", and production apps like ",[409,465,468],{"href":466,"rel":467},"https://t3.chat/",[413],"T3Chat",".",[405,471,472,473,477],{},"A huge thanks to the VoidZero (Vite and Rolldown), Nuxt (",[409,474,476],{"href":475},"#nuxt-v5","v5 is coming!",") and TanStack Start teams and every contributor who helped bring Nitro v3 to this milestone. ❤️",[400,479,481],{"id":480},"why-build-servers","Why Build Servers?",[405,483,484,485,489,490,493,494,497,498,501,502,506],{},"We don't ship raw source files to the browser. We use build tools because they solve real problems: ",[486,487,488],"strong",{},"HMR"," for instant feedback, ",[486,491,492],{},"code splitting"," to load only what a route needs, ",[486,495,496],{},"tree shaking"," to eliminate dead code, and ",[486,499,500],{},"minification"," for smaller payloads. Tools like Webpack and then ",[409,503,505],{"href":427,"rel":504},[413],"Vite"," transformed frontend development from painful to productive.",[405,508,509],{},"But frontend apps don't exist in isolation, they need APIs, databases, authentication, real-time data. They need a server.",[405,511,512,513,516,517,520,521,524],{},"With the rise of serverless and edge computing, the server side now faces the same constraints the frontend solved years ago. ",[486,514,515],{},"Cold starts"," mean every millisecond of startup matters. ",[486,518,519],{},"Memory limits"," are strict — bloated dependencies can push you over. ",[486,522,523],{},"Bundle size"," directly impacts deploy speed and boot time. And your code needs to run everywhere: Node.js, Deno, Bun, Cloudflare Workers, Vercel, etc. Yet most server frameworks still ship unoptimized, unbundled code, assuming a long-running process where none of this matters.",[405,526,527,528],{},"Nitro brings the build-tool philosophy to the backend. The same great DX you expect from frontend tooling: HMR for fast iteration and optimized builds powered by Rolldown with tree-shaken production output that performs as close to bare-metal as possible. ",[486,529,530],{},"One codebase, any runtime, any platform.",[400,532,534],{"id":533},"first-class-vite-integration","⚡ First-Class Vite Integration",[405,536,537,538,542],{},"Nitro now has a native ",[409,539,505],{"href":540,"rel":541},"https://vite.dev",[413]," plugin to build full stack apps.",[544,545,550],"pre",{"className":546,"code":547,"filename":548,"language":549,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineConfig } from \"vite\";\nimport { nitro } from \"nitro/vite\";\n\nexport default defineConfig({\n  plugins: [nitro()],\n});\n","vite.config.ts","ts",[551,552,553,576,591,598,614,626],"code",{"__ignoreMap":5},[554,555,558,562,566,569,573],"span",{"class":556,"line":557},"line",1,[554,559,561],{"class":560},"so5gQ","import",[554,563,565],{"class":564},"slsVL"," { defineConfig } ",[554,567,568],{"class":560},"from",[554,570,572],{"class":571},"sfrk1"," \"vite\"",[554,574,575],{"class":564},";\n",[554,577,579,581,584,586,589],{"class":556,"line":578},2,[554,580,561],{"class":560},[554,582,583],{"class":564}," { nitro } ",[554,585,568],{"class":560},[554,587,588],{"class":571}," \"nitro/vite\"",[554,590,575],{"class":564},[554,592,594],{"class":556,"line":593},3,[554,595,597],{"emptyLinePlaceholder":596},true,"\n",[554,599,601,604,607,611],{"class":556,"line":600},4,[554,602,603],{"class":560},"export",[554,605,606],{"class":560}," default",[554,608,610],{"class":609},"shcOC"," defineConfig",[554,612,613],{"class":564},"({\n",[554,615,617,620,623],{"class":556,"line":616},5,[554,618,619],{"class":564},"  plugins: [",[554,621,622],{"class":609},"nitro",[554,624,625],{"class":564},"()],\n",[554,627,629],{"class":556,"line":628},6,[554,630,631],{"class":564},"});\n",[405,633,634,635,638],{},"Adding ",[551,636,637],{},"nitro()"," to your Vite apps gives you:",[640,641,642,649,655],"ul",{},[643,644,645,648],"li",{},[486,646,647],{},"API routes"," via filesystem routing",[643,650,651,654],{},[486,652,653],{},"Server-side rendering"," integrated with your frontend build",[643,656,657,660,661,664,665,668],{},[486,658,659],{},"A production server"," — a single ",[551,662,663],{},"vite build"," produces an optimized ",[551,666,667],{},".output/"," folder with both frontend and backend, ready to deploy",[405,670,671,672,675,676,457,679,424,682,469],{},"This means you can add a full backend to any Vite project — See ",[409,673,674],{"href":225},"examples"," with ",[409,677,678],{"href":348},"React",[409,680,681],{"href":366},"Vue",[409,683,684],{"href":352},"Solid.js",[400,686,688],{"id":687},"performance-by-default-zero-bloat","🚀 Performance by Default, Zero Bloat",[405,690,691],{},"Nitro compiles your routes at build time. There is no runtime router — each route loads on demand. Only the code needed to handle a specific request is loaded and executed.",[405,693,694,695,698,699,702,703,708,709,469],{},"Minimal server bundle built with the ",[551,696,697],{},"standard"," preset is less than ",[551,700,701],{},"10kB",", can be served with ",[409,704,707],{"href":705,"rel":706},"https://srvx.h3.dev/",[413],"srvx"," at close to native speeds, and includes all the good features from ",[409,710,713],{"href":711,"rel":712},"https://h3.dev/",[413],"H3",[405,715,716,717,722,723,469],{},"We have also significantly reduced the number of dependencies, down to ",[409,718,721],{"href":719,"rel":720},"https://npmgraph.js.org/?q=nitro-nightly",[413],"less than 20"," from ",[409,724,727],{"href":725,"rel":726},"https://npmgraph.js.org/?q=nitropack",[413],"321 dependencies",[400,729,731,732],{"id":730},"️-new-identity-nitro","🖌️ New Identity: ",[551,733,622],{},[405,735,736,737,743,744,469],{},"Nitro v3 ships under a new NPM package: ",[409,738,741],{"href":739,"rel":740},"https://npmx.dev/package/nitro",[413],[551,742,622],{},", replacing the legacy ",[551,745,746],{},"nitropack",[405,748,749,750,753],{},"All imports now use clean ",[551,751,752],{},"nitro/*"," subpaths:",[544,755,757],{"className":546,"code":756,"language":549,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\nimport { defineHandler } from \"nitro\";\nimport { useStorage } from \"nitro/storage\";\nimport { useDatabase } from \"nitro/database\";\n",[551,758,759,773,787,801],{"__ignoreMap":5},[554,760,761,763,766,768,771],{"class":556,"line":557},[554,762,561],{"class":560},[554,764,765],{"class":564}," { defineNitroConfig } ",[554,767,568],{"class":560},[554,769,770],{"class":571}," \"nitro/config\"",[554,772,575],{"class":564},[554,774,775,777,780,782,785],{"class":556,"line":578},[554,776,561],{"class":560},[554,778,779],{"class":564}," { defineHandler } ",[554,781,568],{"class":560},[554,783,784],{"class":571}," \"nitro\"",[554,786,575],{"class":564},[554,788,789,791,794,796,799],{"class":556,"line":593},[554,790,561],{"class":560},[554,792,793],{"class":564}," { useStorage } ",[554,795,568],{"class":560},[554,797,798],{"class":571}," \"nitro/storage\"",[554,800,575],{"class":564},[554,802,803,805,808,810,813],{"class":556,"line":600},[554,804,561],{"class":560},[554,806,807],{"class":564}," { useDatabase } ",[554,809,568],{"class":560},[554,811,812],{"class":571}," \"nitro/database\"",[554,814,575],{"class":564},[405,816,817,818,821],{},"No more deep ",[551,819,820],{},"nitropack/runtime/*"," paths, plus, you can import nitro subpaths outside of builder useful for unit testing.",[400,823,825],{"id":824},"bring-your-own-framework","🔧 Bring Your Own Framework",[405,827,828,829,832],{},"Nitro v3 is not opinionated about your HTTP layer. You can use the built-in filesystem routing, or take full control with a ",[551,830,831],{},"server.ts"," entry file and bring any framework you prefer:",[544,834,836],{"className":546,"code":835,"filename":831,"language":549,"meta":5,"style":5},"import { Hono } from \"hono\";\n\nconst app = new Hono();\napp.get(\"/\", (c) => c.text(\"Hello from Hono!\"));\n\nexport default app;\n",[551,837,838,852,856,877,918,922],{"__ignoreMap":5},[554,839,840,842,845,847,850],{"class":556,"line":557},[554,841,561],{"class":560},[554,843,844],{"class":564}," { Hono } ",[554,846,568],{"class":560},[554,848,849],{"class":571}," \"hono\"",[554,851,575],{"class":564},[554,853,854],{"class":556,"line":578},[554,855,597],{"emptyLinePlaceholder":596},[554,857,858,861,865,868,871,874],{"class":556,"line":593},[554,859,860],{"class":560},"const",[554,862,864],{"class":863},"suiK_"," app",[554,866,867],{"class":560}," =",[554,869,870],{"class":560}," new",[554,872,873],{"class":609}," Hono",[554,875,876],{"class":564},"();\n",[554,878,879,882,885,888,891,894,898,901,904,907,910,912,915],{"class":556,"line":600},[554,880,881],{"class":564},"app.",[554,883,884],{"class":609},"get",[554,886,887],{"class":564},"(",[554,889,890],{"class":571},"\"/\"",[554,892,893],{"class":564},", (",[554,895,897],{"class":896},"sQHwn","c",[554,899,900],{"class":564},") ",[554,902,903],{"class":560},"=>",[554,905,906],{"class":564}," c.",[554,908,909],{"class":609},"text",[554,911,887],{"class":564},[554,913,914],{"class":571},"\"Hello from Hono!\"",[554,916,917],{"class":564},"));\n",[554,919,920],{"class":556,"line":616},[554,921,597],{"emptyLinePlaceholder":596},[554,923,924,926,928],{"class":556,"line":628},[554,925,603],{"class":560},[554,927,606],{"class":560},[554,929,930],{"class":564}," app;\n",[400,932,934],{"id":933},"h3-v2-with-web-standards","🌐 H3 (v2) with Web Standards",[405,936,937,938,943,944,457,951,457,958,965,966,469],{},"Nitro v3 upgrades to ",[409,939,942],{"href":940,"rel":941},"https://h3.dev",[413],"H3 v2",", which has been fully rewritten around web standard primitives — ",[409,945,948],{"href":946,"rel":947},"https://developer.mozilla.org/en-US/docs/Web/API/Request",[413],[551,949,950],{},"Request",[409,952,955],{"href":953,"rel":954},"https://developer.mozilla.org/en-US/docs/Web/API/Response",[413],[551,956,957],{},"Response",[409,959,962],{"href":960,"rel":961},"https://developer.mozilla.org/en-US/docs/Web/API/Headers",[413],[551,963,964],{},"Headers",", and ",[409,967,970],{"href":968,"rel":969},"https://developer.mozilla.org/en-US/docs/Web/API/URL",[413],[551,971,972],{},"URL",[405,974,975],{},"The result is cleaner, more portable server code:",[544,977,980],{"className":546,"code":978,"filename":979,"language":549,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler((event) => {\n  const ua = event.req.headers.get(\"user-agent\");\n  return { message: \"Hello Nitro v3!\", ua };\n});\n","routes/hello.ts",[551,981,982,994,998,1020,1043,1057],{"__ignoreMap":5},[554,983,984,986,988,990,992],{"class":556,"line":557},[554,985,561],{"class":560},[554,987,779],{"class":564},[554,989,568],{"class":560},[554,991,784],{"class":571},[554,993,575],{"class":564},[554,995,996],{"class":556,"line":578},[554,997,597],{"emptyLinePlaceholder":596},[554,999,1000,1002,1004,1007,1010,1013,1015,1017],{"class":556,"line":593},[554,1001,603],{"class":560},[554,1003,606],{"class":560},[554,1005,1006],{"class":609}," defineHandler",[554,1008,1009],{"class":564},"((",[554,1011,1012],{"class":896},"event",[554,1014,900],{"class":564},[554,1016,903],{"class":560},[554,1018,1019],{"class":564}," {\n",[554,1021,1022,1025,1028,1030,1033,1035,1037,1040],{"class":556,"line":600},[554,1023,1024],{"class":560},"  const",[554,1026,1027],{"class":863}," ua",[554,1029,867],{"class":560},[554,1031,1032],{"class":564}," event.req.headers.",[554,1034,884],{"class":609},[554,1036,887],{"class":564},[554,1038,1039],{"class":571},"\"user-agent\"",[554,1041,1042],{"class":564},");\n",[554,1044,1045,1048,1051,1054],{"class":556,"line":616},[554,1046,1047],{"class":560},"  return",[554,1049,1050],{"class":564}," { message: ",[554,1052,1053],{"class":571},"\"Hello Nitro v3!\"",[554,1055,1056],{"class":564},", ua };\n",[554,1058,1059],{"class":556,"line":628},[554,1060,631],{"class":564},[405,1062,1063],{},"Reading request bodies uses native APIs:",[544,1065,1068],{"className":546,"code":1066,"filename":1067,"language":549,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler(async (event) => {\n  const body = await event.req.json();\n  return { received: body };\n});\n","routes/submit.ts",[551,1069,1070,1082,1086,1110,1130,1137],{"__ignoreMap":5},[554,1071,1072,1074,1076,1078,1080],{"class":556,"line":557},[554,1073,561],{"class":560},[554,1075,779],{"class":564},[554,1077,568],{"class":560},[554,1079,784],{"class":571},[554,1081,575],{"class":564},[554,1083,1084],{"class":556,"line":578},[554,1085,597],{"emptyLinePlaceholder":596},[554,1087,1088,1090,1092,1094,1096,1099,1102,1104,1106,1108],{"class":556,"line":593},[554,1089,603],{"class":560},[554,1091,606],{"class":560},[554,1093,1006],{"class":609},[554,1095,887],{"class":564},[554,1097,1098],{"class":560},"async",[554,1100,1101],{"class":564}," (",[554,1103,1012],{"class":896},[554,1105,900],{"class":564},[554,1107,903],{"class":560},[554,1109,1019],{"class":564},[554,1111,1112,1114,1117,1119,1122,1125,1128],{"class":556,"line":600},[554,1113,1024],{"class":560},[554,1115,1116],{"class":863}," body",[554,1118,867],{"class":560},[554,1120,1121],{"class":560}," await",[554,1123,1124],{"class":564}," event.req.",[554,1126,1127],{"class":609},"json",[554,1129,876],{"class":564},[554,1131,1132,1134],{"class":556,"line":616},[554,1133,1047],{"class":560},[554,1135,1136],{"class":564}," { received: body };\n",[554,1138,1139],{"class":556,"line":628},[554,1140,631],{"class":564},[405,1142,1143],{},"No wrappers, no abstractions for things the platform already provides. If you know the Web API, you know H3 v2.",[405,1145,1146,457,1150,457,1154,1158],{},[409,1147,255],{"href":1148,"rel":1149},"https://elysiajs.com/",[413],[409,1151,1153],{"href":940,"rel":1152},[413],"h3",[409,1155,275],{"href":1156,"rel":1157},"https://hono.dev",[413]," — anything that speaks web standards works with Nitro.",[400,1160,1162],{"id":1161},"️-built-in-primitives","🗄️ Built-in Primitives",[405,1164,1165,1166,1169],{},"Nitro ships with powerful but small and ",[486,1167,1168],{},"fully opt-in"," agnostic server primitives that work across every runtime.",[1171,1172,1173],"note",{},[405,1174,1175,1176,424,1181,1186],{},"When not used, nothing extra will be added to the server bundle. You can still use native platform primitives alongside Nitro's built-in ones.\nWe are also bringing first class emulation for platform-specific primitives for dev See ",[409,1177,1180],{"href":1178,"rel":1179},"https://github.com/unjs/env-runner",[413],"env-runner",[409,1182,1185],{"href":1183,"rel":1184},"https://github.com/nitrojs/nitro/pull/4088",[413],"nitrojs/nitro#4088"," for more details.",[1153,1188,1190],{"id":1189},"storage","Storage",[405,1192,1193,1194,1199],{},"A runtime-agnostic key-value layer with 20+ drivers — FS, Redis, S3, Cloudflare KV, Vercel Blob and ",[409,1195,1198],{"href":1196,"rel":1197},"https://unstorage.unjs.io/drivers",[413],"more",". Attach drivers to namespaces and swap them without changing your application code.",[544,1201,1203],{"className":546,"code":1202,"language":549,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\n\nconst storage = useStorage();\nawait storage.setItem(\"user:1\", { name: \"Nitro\" });\n",[551,1204,1205,1217,1221,1235],{"__ignoreMap":5},[554,1206,1207,1209,1211,1213,1215],{"class":556,"line":557},[554,1208,561],{"class":560},[554,1210,793],{"class":564},[554,1212,568],{"class":560},[554,1214,798],{"class":571},[554,1216,575],{"class":564},[554,1218,1219],{"class":556,"line":578},[554,1220,597],{"emptyLinePlaceholder":596},[554,1222,1223,1225,1228,1230,1233],{"class":556,"line":593},[554,1224,860],{"class":560},[554,1226,1227],{"class":863}," storage",[554,1229,867],{"class":560},[554,1231,1232],{"class":609}," useStorage",[554,1234,876],{"class":564},[554,1236,1237,1240,1243,1246,1248,1251,1254,1257],{"class":556,"line":600},[554,1238,1239],{"class":560},"await",[554,1241,1242],{"class":564}," storage.",[554,1244,1245],{"class":609},"setItem",[554,1247,887],{"class":564},[554,1249,1250],{"class":571},"\"user:1\"",[554,1252,1253],{"class":564},", { name: ",[554,1255,1256],{"class":571},"\"Nitro\"",[554,1258,1259],{"class":564}," });\n",[1261,1262],"read-more",{"to":74},[1153,1264,1266],{"id":1265},"caching","Caching",[405,1268,1269],{},"Cache server routes and functions, backed by the storage layer. Supports stale-while-revalidate, TTL, and custom cache keys out of the box.",[544,1271,1273],{"className":546,"code":1272,"language":549,"meta":5,"style":5},"import { defineCachedHandler } from \"nitro/cache\";\n\nexport default defineCachedHandler((event) => {\n  return \"I am cached for an hour\";\n}, { maxAge: 60 * 60 });\n",[551,1274,1275,1289,1293,1312,1321],{"__ignoreMap":5},[554,1276,1277,1279,1282,1284,1287],{"class":556,"line":557},[554,1278,561],{"class":560},[554,1280,1281],{"class":564}," { defineCachedHandler } ",[554,1283,568],{"class":560},[554,1285,1286],{"class":571}," \"nitro/cache\"",[554,1288,575],{"class":564},[554,1290,1291],{"class":556,"line":578},[554,1292,597],{"emptyLinePlaceholder":596},[554,1294,1295,1297,1299,1302,1304,1306,1308,1310],{"class":556,"line":593},[554,1296,603],{"class":560},[554,1298,606],{"class":560},[554,1300,1301],{"class":609}," defineCachedHandler",[554,1303,1009],{"class":564},[554,1305,1012],{"class":896},[554,1307,900],{"class":564},[554,1309,903],{"class":560},[554,1311,1019],{"class":564},[554,1313,1314,1316,1319],{"class":556,"line":600},[554,1315,1047],{"class":560},[554,1317,1318],{"class":571}," \"I am cached for an hour\"",[554,1320,575],{"class":564},[554,1322,1323,1326,1329,1332,1335],{"class":556,"line":616},[554,1324,1325],{"class":564},"}, { maxAge: ",[554,1327,1328],{"class":863},"60",[554,1330,1331],{"class":560}," *",[554,1333,1334],{"class":863}," 60",[554,1336,1259],{"class":564},[1261,1338],{"to":69},[1153,1340,38],{"id":1341},"database",[405,1343,1344,1345,1349],{},"A built-in SQL database that defaults to SQLite for development and can connect to Postgres, MySQL, and ",[409,1346,1198],{"href":1347,"rel":1348},"https://db0.unjs.io/connectors",[413]," using the same API.",[544,1351,1353],{"className":546,"code":1352,"language":549,"meta":5,"style":5},"import { useDatabase } from \"nitro/database\";\n\nconst db = useDatabase();\nconst users = await db.sql`SELECT * FROM users`;\n",[551,1354,1355,1367,1371,1385],{"__ignoreMap":5},[554,1356,1357,1359,1361,1363,1365],{"class":556,"line":557},[554,1358,561],{"class":560},[554,1360,807],{"class":564},[554,1362,568],{"class":560},[554,1364,812],{"class":571},[554,1366,575],{"class":564},[554,1368,1369],{"class":556,"line":578},[554,1370,597],{"emptyLinePlaceholder":596},[554,1372,1373,1375,1378,1380,1383],{"class":556,"line":593},[554,1374,860],{"class":560},[554,1376,1377],{"class":863}," db",[554,1379,867],{"class":560},[554,1381,1382],{"class":609}," useDatabase",[554,1384,876],{"class":564},[554,1386,1387,1389,1392,1394,1396,1399,1402,1405],{"class":556,"line":600},[554,1388,860],{"class":560},[554,1390,1391],{"class":863}," users",[554,1393,867],{"class":560},[554,1395,1121],{"class":560},[554,1397,1398],{"class":564}," db.",[554,1400,1401],{"class":609},"sql",[554,1403,1404],{"class":571},"`SELECT * FROM users`",[554,1406,575],{"class":564},[1261,1408],{"to":39},[400,1410,1412],{"id":1411},"deploy-anywhere","🌍 Deploy Anywhere",[405,1414,1415,1416,1418],{},"Build your server into an optimized ",[551,1417,667],{}," folder compatible with:",[640,1420,1421,1426],{},[643,1422,1423,1425],{},[486,1424,96],{},": Node.js, Bun, Deno",[643,1427,1428,1431],{},[486,1429,1430],{},"Platforms",": Cloudflare Workers, Netlify, Vercel, AWS Lambda, Azure, Firebase, Deno Deploy, and more",[405,1433,1434],{},"No configuration needed — Nitro auto-detects your deployment target. Take advantage of platform features like ISR, SWR, and edge rendering without changing a single line of code.",[400,1436,1438],{"id":1437},"server-side-rendering","🎨 Server-Side Rendering",[405,1440,1441],{},"Render HTML with your favorite templating engine, or use component libraries like React, Vue, or Svelte directly on the server. Go full universal rendering with client-side hydration.",[405,1443,1444],{},"Nitro provides the foundation and a progressive approach — start with API routes, add rendering when you need it, and scale to full SSR at your own pace.",[1261,1446],{"to":19},[400,1448,1450],{"id":1449},"nuxt-v5","🟢 Nuxt v5",[405,1452,1453,1454,469],{},"Nitro v3 will power the next major version of ",[409,1455,1457],{"href":411,"rel":1456},[413],"Nuxt",[405,1459,1460,1465],{},[409,1461,1464],{"href":1462,"rel":1463},"https://nuxt.com/blog/roadmap-v4",[413],"Nuxt v5"," will ship with Nitro v3 and H3 v2 at its core, bringing web-standard request handling, Rolldown-powered builds, and the Vite Environment API to the Nuxt ecosystem.",[405,1467,1468,1469,1474],{},"If you're a Nuxt user, you can already start preparing by familiarizing yourself with  Nitro v3's new APIs, which will carry directly into Nuxt 5, and you can ",[409,1470,1473],{"href":1471,"rel":1472},"https://github.com/nuxt/nuxt/discussions/34504",[413],"follow progress"," on adopting Nitro v3 in Nuxt",[400,1476,1478],{"id":1477},"getting-started","🏁 Getting Started",[1153,1480,1482],{"id":1481},"create-a-new-project","Create a New Project",[1484,1485],"pm-x",{"command":1486},"create-nitro-app",[405,1488,1489,1490,1493],{},"See the ",[409,1491,1492],{"href":14},"quick start guide"," for a full step-by-step walkthrough.",[400,1495,1497],{"id":1496},"migrating-from-v2","🔄 Migrating from v2",[405,1499,1500],{},"Nitro v3 introduces intentional breaking changes to set a cleaner foundation. Here are the key ones:",[640,1502,1503,1511,1518,1527,1535,1542,1548],{},[643,1504,1505,1507,1508,1510],{},[551,1506,746],{}," → ",[551,1509,622],{}," (package rename)",[643,1512,1513,1507,1515,1517],{},[551,1514,820],{},[551,1516,752],{}," (clean subpath imports)",[643,1519,1520,1507,1523,1526],{},[551,1521,1522],{},"eventHandler",[551,1524,1525],{},"defineHandler"," (H3 v2)",[643,1528,1529,1507,1532,1526],{},[551,1530,1531],{},"createError",[551,1533,1534],{},"HTTPError",[643,1536,1537,1538,1541],{},"Web standard ",[551,1539,1540],{},"event.req"," headers and body APIs",[643,1543,1544,1545],{},"Node.js minimum version: ",[486,1546,1547],{},"20",[643,1549,1550,1551,1507,1554,1557],{},"Preset renames and consolidation (e.g., ",[551,1552,1553],{},"cloudflare",[551,1555,1556],{},"cloudflare_module",")",[405,1559,1560,1561,469],{},"For a complete list, see the ",[409,1562,1563],{"href":79},"migration guide",[1565,1566],"hr",{},[405,1568,1569],{},"Thank you to everyone who has contributed to Nitro over the years. We can't wait to see what you build with the new Nitro! ❤️",[640,1571,1572,1580],{},[643,1573,1574,1579],{},[409,1575,1578],{"href":1576,"rel":1577},"https://github.com/nitrojs/nitro",[413],"GitHub"," — Issues and discussions",[643,1581,1582,1587],{},[409,1583,1586],{"href":1584,"rel":1585},"https://discord.nitro.build",[413],"Discord"," — Chat with the community",[1589,1590,1591],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}",{"title":5,"searchDepth":578,"depth":578,"links":1593},[1594,1595,1596,1597,1598,1600,1601,1602,1607,1608,1609,1610,1613],{"id":402,"depth":578,"text":403},{"id":480,"depth":578,"text":481},{"id":533,"depth":578,"text":534},{"id":687,"depth":578,"text":688},{"id":730,"depth":578,"text":1599},"🖌️ New Identity: nitro",{"id":824,"depth":578,"text":825},{"id":933,"depth":578,"text":934},{"id":1161,"depth":578,"text":1162,"children":1603},[1604,1605,1606],{"id":1189,"depth":593,"text":1190},{"id":1265,"depth":593,"text":1266},{"id":1341,"depth":593,"text":38},{"id":1411,"depth":578,"text":1412},{"id":1437,"depth":578,"text":1438},{"id":1449,"depth":578,"text":1450},{"id":1477,"depth":578,"text":1478,"children":1611},[1612],{"id":1481,"depth":593,"text":1482},{"id":1496,"depth":578,"text":1497},"Nitro v3 is now available as a public beta — a ground-up evolution of the server framework, built around web standards, Rolldown, Vite v8, and the same deploy-anywhere promise.","md",{"date":1617,"category":1618,"authors":1619,"icon":386},"2026-03-11","release",[1620],{"name":1621,"github":1622},"Pooya Parsa","pi0",{"icon":386},{"title":388,"description":1614},"Hb62Zadr-PaU06SzG7J4BDpm3lmOnHwUwKY8MosspyU",1775834861648]