Vercel to platforma do hostingu i deploymentu aplikacji webowych. Stworzona przez twórców Next.js, jest zoptymalizowana pod frameworki React, Next.js, Svelte, Nuxt i inne. Git push = automatyczny deploy na globalny edge network.
Vercel oferuje: preview deployments (każdy PR ma swój URL), serverless functions, edge functions, analytics, speed insights, image optimization i integracje z bazami danych (Vercel Postgres, KV, Blob).
{
"framework": "nextjs",
"regions": ["cdg1"],
"env": {
"DATABASE_URL": "@database-url",
"STRIPE_SECRET_KEY": "@stripe-secret"
},
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Frame-Options", "value": "DENY" }
]
}
]
}
export const config = { runtime: 'edge' };
export default function handler(req: Request) {
const country = req.headers.get('x-vercel-ip-country');
const city = req.headers.get('x-vercel-ip-city');
return new Response(
JSON.stringify({ country, city, edge: true }),
{ headers: { 'Content-Type': 'application/json' } }
);
}
Push do main = produkcja. Push do brancha = preview URL. Zero konfiguracji.
Każdy PR ma swój URL. Testuj, udostępniaj klientom, zbieraj feedback.
Serverless na edge. Geolokalizacja, A/B testing, personalizacja. ~0ms cold start.
Web Vitals, Speed Insights, real user monitoring. Bez dodatkowego kodu.
Postgres, KV (Redis), Blob (S3). Managed databases zintegrowane z frameworkiem.
Automatyczna optymalizacja, resize, WebP/AVIF. CDN cache. next/image.
Idealny gdy: budujesz z Next.js, chcesz zero-config deploy, potrzebujesz preview URLs dla klientów, budujesz marketing site lub SaaS frontend.
Nie najlepszy gdy: potrzebujesz pełnej kontroli nad infrastrukturą (lepiej AWS/Docker), budujesz backend-heavy app (lepiej Railway/Fly.io), budżet jest ograniczony przy dużym ruchu.