Vercel is a zero-configuration platform that can host nano as a fully serverless Astro application. When Vercel detects theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mohameodo/nano/llms.txt
Use this file to discover all available pages before exploring further.
VERCEL=1 environment variable at build time, nano automatically switches to the @astrojs/vercel/serverless adapter — no manual config changes required. The repository ships a vercel.json that handles the rest.
How nano Detects Vercel
Theastro.config.mjs adapter selection logic checks the runtime environment at build time:
- If
process.env.VERCELis set → uses@astrojs/vercel/serverless - If
CF_PAGES,CLOUDFLARE, orWORKERS_CIare set → uses@astrojs/cloudflare - Otherwise → uses
@astrojs/nodein standalone mode (default for Docker / Railway)
VERCEL=1 automatically during every build, so you never need to set it yourself.
vercel.json
The repository includes avercel.json that tells Vercel exactly how to build nano:
framework: "astro"— tells Vercel to treat this as an Astro project for auto-detection and optimisations.buildCommand: "pnpm build"— uses pnpm instead of npm or yarn.installCommand: "pnpm install"— ensures pnpm is used for dependency installation.cleanUrls: true— strips.htmlextensions from URLs for cleaner routing.
Deploy to Vercel
Push your repo to GitHub
Make sure your nano fork or clone is pushed to a GitHub repository (GitLab and Bitbucket also work with Vercel).
Import the project in Vercel
Go to vercel.com/new, click Add New → Project, and select your GitHub repository. Vercel auto-detects the Astro framework from
vercel.json and pre-fills the build settings.Set environment variables
Before deploying, open Project → Settings → Environment Variables and add your configuration. At minimum, consider setting:
All variables set here are securely injected at both build time and runtime.
| Variable | Example value | Notes |
|---|---|---|
TMDB_API_KEY | abc123... | Optional — nano has a built-in fallback |
TMDB_ACCESS_TOKEN | eyJ... | Optional — nano has a built-in fallback |
SITE_NAME | my nano | Display name in the UI |
DEFAULT_SERVER | nemu | Default streaming server |
THEME_HUE | 200 | Accent colour hue 0–360 |
THEME_MODE | dark | dark or light |
ENABLE_AUTH | false | Set true to enable login page |
DATABASE_TYPE | json | Use json on Vercel (no PostgreSQL native driver) |
Redeployments
Every push to your connected branch triggers an automatic redeploy. You can also trigger a manual redeploy from the Vercel dashboard under Deployments → Redeploy.Limitations
TMDB_API_KEY and TMDB_ACCESS_TOKEN are both optional. nano ships with a built-in fallback key so TMDB data loads even if you do not provide your own. For production deployments with heavy traffic, supplying your own key is recommended to avoid rate limiting.