Everything Vercel Inc. publishes
V

Vercel Inc.

Nitro on Vercel

/docs/frameworks/backend/nitro

docs
Words
569
Reading time
3 min
Last crawled
2026-09-26
Cited by
8 of their pages
Language
EN
cat vercel.com/docs/frameworks/backend/nitro.md
Nitro is a full-stack framework with TypeScript-first support. It includes filesystem routing, code-splitting for fast startup, built-in caching, and multi-driver storage. It enables deployments from the same codebase to any platform with output sizes under 1MB. You can deploy a Nitro app to Vercel with zero configuration. To get started with Nitro on Vercel, use the following Nitro template to deploy to Vercel with zero configuration: Vercel deployments can [integrate with your git provider](https://vercel.com/docs/git) to [generate preview URLs](https://vercel.com/docs/deployments/environments#preview-environment-pre-production) for each pull request you make to your Nitro project. Get started by initializing a new Nitro project using [Vercel CLI init command](https://vercel.com/docs/cli/init): This will clone the [Nitro example repository](https://github.com/vercel/vercel/tree/main/examples/nitro) in a directory called `nitro`. When you deploy a Nitro app to Vercel, you can use Vercel specific features such as [Incremental Static Regeneration (ISR)](#incremental-static-regeneration-isr), [preview deployments](https://vercel.com/docs/deployments/environments#preview-environment-pre-production), [Fluid compute](https://vercel.com/docs/fluid-compute), [Observability](#observability), and [Vercel firewall](https://vercel.com/docs/vercel-firewall) with zero or minimum configuration. [ISR](https://vercel.com/docs/incremental-static-regeneration) allows you to create or update content without redeploying your site. ISR has three main benefits for developers: better performance, improved security, and faster build times. With [on-demand revalidation](https://vercel.com/docs/incremental-static-regeneration/quickstart#on-demand-revalidation), you can purge the cache for an ISR route whenever you want, foregoing the time interval required with background revalidation. To revalidate a path to a prerendered function: 1.  Create an [Environment Variable](https://vercel.com/docs/environment-variables) to store a revalidation secret by:        -   Using the command:        -   Or [generating a secret](https://generate-secret.vercel.app/32) to create a random value.2.  Update your configuration to use the revalidation secret as follows:    3.  You can revalidate a path to a prerendered function by making a `GET` or `HEAD` request to that path with a header of `x-prerender-revalidate: bypassToken`        When the prerendered function endpoint is accessed with this header set, the cache will be revalidated. The next request to that function will return a fresh response.     To have more control over ISR caching, you can pass an options object to the `isr` route rule as shown below: By default, query parameters are ignored by cache unless you specify them in the `allowQuery` array. The following options are available: Option Type Description `expiration` `number | false` The expiration time, in seconds, before the cached asset is re-generated by invoking the serverless function. Setting the value to `false` (or `isr: true` in the route rule) will cause it to never expire. `group` `number` Group number of the asset. Use this to revalidate multiple assets at the same time. `allowQuery` `string[] | undefined` List of query string parameter names that will be cached independently. If you specify an empty array, query values are not considered for caching. If `undefined`, each unique query value is cached independently. For wildcard `/**` route rules, `url` is always added. `passQuery` `boolean` When `true`, the query string will be present on the request argument passed to the invoked function. The `allowQuery` filter still applies. With [Vercel Observability](https://vercel.com/docs/observability), you can view detailed performance insights broken down by route and monitor function execution performance. This can help you identify bottlenecks and optimization opportunities. Nitro (>=2.12) generates routing hints for [functions observability insights](https://vercel.com/docs/observability/insights#vercel-functions), providing a detailed view of performance broken down by route. To enable this feature, ensure you are using a compatibility date of `2025-07-15` or later. Framework integrations can use the `ssrRoutes` configuration to declare SSR routes. For more information, see [#3475](https://github.com/unjs/nitro/pull/3475). When you deploy a Nitro app to Vercel, your server routes automatically become [Vercel Functions](https://vercel.com/docs/functions) and use [Fluid compute](https://vercel.com/docs/fluid-compute) by default. Learn more about deploying Nitro projects on Vercel with the following resources: