[{"data":1,"prerenderedAt":650},["ShallowReactive",2],{"navigation":3,"-docs":402,"-docs-surround":646},[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":10,"body":404,"description":640,"extension":641,"meta":642,"navigation":643,"path":6,"seo":644,"stem":7,"__hash__":645},"content\u002F1.docs\u002F1.index.md",{"type":405,"value":406,"toc":628,"icon":11},"minimark",[407,411,416,424,449,453,456,460,467,471,474,478,481,485,492,495,498,502,505,509,521,609,618,624],[408,409,410],"p",{},"Nitro gives you a production-ready server with filesystem routing, code-splitting, and built-in support for storage, caching, and databases — all runtime-agnostic and deployable anywhere.",[412,413,415],"h2",{"id":414},"what-is-nitro","What is Nitro?",[408,417,418,419,423],{},"Create server and API routes inside the ",[420,421,422],"code",{},"routes\u002F"," directory. Each file maps directly to a URL path, and Nitro handles the rest — routing, code-splitting, and optimized builds.",[408,425,426,427,430,431,437,438,443,444,448],{},"You can also take full control of the server entry by creating a ",[420,428,429],{},"server.ts"," file. Nitro’s high-level, runtime-agnostic approach lets you use any HTTP library, such as ",[432,433,264],"a",{"href":434,"rel":435},"https:\u002F\u002Felysiajs.com\u002F",[436],"nofollow",", ",[432,439,442],{"href":440,"rel":441},"https:\u002F\u002Fh3.dev",[436],"h3",", or ",[432,445,284],{"href":446,"rel":447},"https:\u002F\u002Fhono.dev",[436],".",[442,450,452],{"id":451},"performance","Performance",[408,454,455],{},"Nitro compiles your routes at build time, removing the need for a runtime router. Only the code required to handle each incoming request is loaded and executed. This makes it ideal for serverless hosting, with near-0ms boot time regardless of project size.",[442,457,459],{"id":458},"deploy-anywhere","Deploy Anywhere",[408,461,462,463,466],{},"Build your server into an optimized ",[420,464,465],{},".output\u002F"," folder compatible with Node.js, Bun, Deno, and many hosting platforms without any configuration — Cloudflare Workers, Netlify, Vercel, and more. Take advantage of platform features like ESR, ISR, and SWR without changing a single line of code.",[442,468,470],{"id":469},"server-side-rendering","Server-Side Rendering",[408,472,473],{},"Render HTML with your favorite templating engine, or use component libraries such as React, Vue, or Svelte directly on the server. Go full universal rendering with client-side hydration. Nitro provides the foundation and a progressive approach to reach your goals.",[442,475,477],{"id":476},"storage","Storage",[408,479,480],{},"Nitro includes a runtime-agnostic key-value storage layer out of the box. It uses in-memory storage by default, but you can connect more than 20 different drivers (FS, Redis, S3, etc.), attach them to different namespaces, and swap them without changing your code.",[442,482,484],{"id":483},"caching","Caching",[408,486,487,488,491],{},"Nitro supports caching for both server routes and server functions, backed directly by the server storage (via the ",[420,489,490],{},"cache"," namespace).",[442,493,38],{"id":494},"database",[408,496,497],{},"Nitro also includes a built-in SQL database. It defaults to SQLite, but you can connect to and query more than 10 databases (Postgres, MySQL, PGLite, etc.) using the same API.",[442,499,501],{"id":500},"meta-framework-foundation","Meta-Framework Foundation",[408,503,504],{},"Nitro can be used as the foundation for building your own meta-framework. Popular frameworks such as Nuxt, SolidStart, and TanStack Start fully or partially leverage Nitro.",[412,506,508],{"id":507},"vite-integration","Vite Integration",[408,510,511,512,517,518,448],{},"Nitro integrates seamlessly with ",[432,513,516],{"href":514,"rel":515},"https:\u002F\u002Fvite.dev",[436],"Vite"," as a plugin. If you’re building a frontend application with Vite, adding Nitro gives you API routes, server-side rendering, and a full production server — all built together with ",[420,519,520],{},"vite build",[522,523,528],"pre",{"className":524,"code":525,"filename":526,"language":527,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineConfig } from \"vite\";\nimport { nitro } from \"nitro\u002Fvite\";\n\nexport default defineConfig({\n  plugins: [nitro()],\n});\n","vite.config.ts","ts",[420,529,530,553,568,575,591,603],{"__ignoreMap":5},[531,532,535,539,543,546,550],"span",{"class":533,"line":534},"line",1,[531,536,538],{"class":537},"so5gQ","import",[531,540,542],{"class":541},"slsVL"," { defineConfig } ",[531,544,545],{"class":537},"from",[531,547,549],{"class":548},"sfrk1"," \"vite\"",[531,551,552],{"class":541},";\n",[531,554,556,558,561,563,566],{"class":533,"line":555},2,[531,557,538],{"class":537},[531,559,560],{"class":541}," { nitro } ",[531,562,545],{"class":537},[531,564,565],{"class":548}," \"nitro\u002Fvite\"",[531,567,552],{"class":541},[531,569,571],{"class":533,"line":570},3,[531,572,574],{"emptyLinePlaceholder":573},true,"\n",[531,576,578,581,584,588],{"class":533,"line":577},4,[531,579,580],{"class":537},"export",[531,582,583],{"class":537}," default",[531,585,587],{"class":586},"shcOC"," defineConfig",[531,589,590],{"class":541},"({\n",[531,592,594,597,600],{"class":533,"line":593},5,[531,595,596],{"class":541},"  plugins: [",[531,598,599],{"class":586},"nitro",[531,601,602],{"class":541},"()],\n",[531,604,606],{"class":533,"line":605},6,[531,607,608],{"class":541},"});\n",[408,610,611,612,614,615,617],{},"With Nitro, ",[420,613,520],{}," produces an optimized ",[420,616,465],{}," folder containing both your frontend and backend — ready to deploy anywhere.",[408,619,620,621,448],{},"Ready to give it a try? Jump into the ",[432,622,623],{"href":14},"quick start",[625,626,627],"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);}",{"title":5,"searchDepth":555,"depth":555,"links":629},[630,639],{"id":414,"depth":555,"text":415,"children":631},[632,633,634,635,636,637,638],{"id":451,"depth":570,"text":452},{"id":458,"depth":570,"text":459},{"id":469,"depth":570,"text":470},{"id":476,"depth":570,"text":477},{"id":483,"depth":570,"text":484},{"id":494,"depth":570,"text":38},{"id":500,"depth":570,"text":501},{"id":507,"depth":555,"text":508},"Nitro is a full-stack server framework, compatible with any runtime and any deployment target.","md",{"icon":11},{"icon":11},{"title":10,"description":640},"2CIY7ruQD3SWzqdh7s38ap-_QdpS4FR6-yxj1zlNkRo",[647,648],null,{"title":13,"path":14,"stem":15,"description":649,"icon":16,"children":-1},"Start with a fresh Nitro project or adopt it in your current Vite project.",1776863246198]