vercellisted
Install: claude install-skill Makiya1202/ai-agents-skills
# Vercel Deployment
Deploy and scale applications on Vercel's edge network.
## Quick Start
```bash
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Production deploy
vercel --prod
```
## vercel.json Configuration
```json
{
"buildCommand": "npm run build",
"outputDirectory": ".next",
"framework": "nextjs",
"regions": ["iad1", "sfo1"],
"functions": {
"api/**/*.ts": {
"memory": 1024,
"maxDuration": 30
}
},
"rewrites": [
{ "source": "/api/:path*", "destination": "/api/:path*" },
{ "source": "/:path*", "destination": "/" }
],
"headers": [
{
"source": "/api/:path*",
"headers": [
{ "key": "Access-Control-Allow-Origin", "value": "*" }
]
}
],
"env": {
"DATABASE_URL": "@database-url"
}
}
```
## Serverless Functions
```typescript
// api/hello.ts
import type { VercelRequest, VercelResponse } from '@vercel/node';
export default function handler(req: VercelRequest, res: VercelResponse) {
const { name = 'World' } = req.query;
res.status(200).json({ message: `Hello ${name}!` });
}
```
## Edge Functions
```typescript
// api/edge.ts
export const config = {
runtime: 'edge',
};
export default function handler(request: Request) {
return new Response(JSON.stringify({ message: 'Hello from Edge!' }), {
headers: { 'content-type': 'application/json' },
});
}
```
## Next.js App Router
```typescript
// app/api/route.ts
import { NextResponse } from 'next/server';
export async func