Nitro - Route Rules is a minimal boilerplate project from Vercel's official examples repository that demonstrates how to use Nitro's Route Rules and deploy the result to Vercel with zero configuration.
What is Nitro - Route Rules?
Nitro - Route Rules is a boilerplate template that pairs the Nitro server runtime with Vercel's deployment platform. It is one of the framework boilerplates maintained by Vercel in the vercel/examples GitHub repository, which also includes examples for Next.js and other frameworks. The template's core purpose is to show a working Nitro application with Route Rules configured, ready to be cloned and deployed via the provided Deploy with Vercel button.
The project includes a live example at https://nitro-route-rules.vercel.app, a local development script using npm run dev, and links to the Nitro quick start guide at nitro.unjs.io. Since it is part of Vercel's curated examples collection (whose repository has over 5,100 stars), it serves as an official reference for combining Nitro with Vercel's edge network.
Key Features
- Zero-configuration deploy — Click the Deploy with Vercel button to clone the repository and create a live deployment without manually setting up build or output configuration.
- Route Rules demonstration — The template shows how to define Nitro Route Rules, which allow per-route control of caching, redirects, and headers.
- Official Vercel example — Maintained in the vercel/examples repository, providing a verified pattern for Nitro applications on Vercel.
- Live demo — A hosted instance is available at https://nitro-route-rules.vercel.app so you can inspect the behavior before deploying your own.
- Quick-start friendly — After cloning, run npm install (or pnpm install / yarn) and then npm run dev to start a development server.
- Documentation links — The template points to the Nitro quick start guide and the nitro.build site for further reading.
Who is it for?
- Nitro learners — Developers who want to see how a minimal Nitro app is structured and how Route Rules are applied to different paths.
- Vercel deployers — Anyone planning to host a Nitro application on Vercel and looking for a verified starting point that handles deployment settings automatically.
- Example explorers — Programmers who browse the Vercel examples repository for patterns to reuse in their own robust and scalable applications.
What can you do with Nitro - Route Rules?
- Deploy a sample Nitro app — Use the one-click deploy button to get a live URL from your clone in minutes.
- Inspect Route Rules behavior — Access the live example to see the effect of route-specific rules, then modify the source and redeploy to test your own configurations.
- Bootstrap a new project — Copy the template as the base for a larger Nitro service, replacing the placeholder handlers with your own application logic.
FAQ
Is Nitro - Route Rules free?
Yes. It is an open example from the vercel/examples repository, and the Nitro framework itself is an open-source project. Deploying to Vercel may require a Vercel account, but the template code has no license fee.
What does Route Rules do in Nitro?
Route Rules in Nitro let you set behavior such as caching, redirects, and custom headers for specific URL patterns. This template demonstrates how to declare those rules so the server handles matched routes accordingly, for example by caching static content.
How do I run this project locally?
First install dependencies with npm install, pnpm install, or yarn. Then start the development server with npm run dev. The project will run in your local development environment with hot reloading.
Can I deploy this without configuring anything?
Yes. Vercel's deploy button automatically opens a new project based on this repository, and the template is preconfigured for Nitro's output format, so no manual build or serverless configuration is required.








