What is Nitro?
mainNitro is a full-stack, runtime-agnostic server framework designed for high performance and deployment flexibility. It provides a production-ready server environment with the following core features:
- Filesystem Routing: Create server and API routes by placing files inside a
routes/directory. Each file maps directly to a URL path. - Optimized Builds: Nitro compiles routes at build time, enabling code-splitting so that only the code required for a specific request is loaded. This results in near-0ms boot times, making it ideal for serverless environments.
- Runtime Agnostic: Nitro can be deployed to Node.js, Bun, Deno, and various hosting platforms (Cloudflare Workers, Netlify, Vercel, etc.) without configuration changes.
- Extensible Server Entry: While filesystem routing is the default, you can take full control by creating a
server.tsfile and using any HTTP library likeh3,Elysia, orHono. - Built-in Capabilities: Includes native support for key-value storage, caching, and SQL databases.