Overview of Nitro server toolkit
mainNitro is a framework-agnostic and deployment-agnostic server toolkit powered by H3 v2, unstorage, and Vite/Rolldown/Rollup. It is used to build and deploy web servers to various runtimes including Node.js, Bun, Deno, Cloudflare, Vercel, and Netlify. It is the engine that powers Nuxt but can also be used standalone.
Key Capabilities:
- Filesystem routing: Uses H3 v2 event handlers with dynamic params and method suffixes.
- Route rules: Declarative configuration for caching, headers, redirects, proxying, and auth.
- Caching: Built-in layer using
unstorageKV (supports cached handlers, functions, and SWR). - Runtime config: Configurable via
NITRO_*environment variables. - Advanced features: Tasks (on-demand/cron), WebSockets/SSE, SQL database layer (via db0), and OpenAPI auto-documentation.
- Extensibility: Support for plugins, lifecycle hooks, and custom server entries.