[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-vercel-vercel-functions":3,"mdc--2ywlrd-key":37,"related-org-vercel-vercel-functions":5025,"related-repo-vercel-vercel-functions":5202},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"vercel-functions","configure and optimize Vercel Functions","Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"vercel","Vercel","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fvercel.png",[12,16,17,20,23],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Backend","backend",{"name":21,"slug":22,"type":15},"Serverless","serverless",{"name":24,"slug":25,"type":15},"Edge Functions","edge-functions",226,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fvercel-plugin","2026-04-06T18:56:13.218714",null,36,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel expert.","https:\u002F\u002Fgithub.com\u002Fvercel\u002Fvercel-plugin\u002Ftree\u002FHEAD\u002Fskills\u002Fvercel-functions","---\nname: vercel-functions\ndescription: Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel.\nmetadata:\n  priority: 8\n  docs:\n    - \"https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\"\n    - \"https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fruntimes\"\n    - \"https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fwebsockets\"\n  sitemap: \"https:\u002F\u002Fvercel.com\u002Fsitemap\u002Fdocs.xml\"\n  pathPatterns:\n    - 'api\u002F**\u002F*.*'\n    - 'pages\u002Fapi\u002F**'\n    - 'src\u002Fpages\u002Fapi\u002F**'\n    - 'app\u002F**\u002Froute.*'\n    - 'src\u002Fapp\u002F**\u002Froute.*'\n    - 'apps\u002F*\u002Fapi\u002F**\u002F*.*'\n    - 'apps\u002F*\u002Fapp\u002F**\u002Froute.*'\n    - 'apps\u002F*\u002Fsrc\u002Fapp\u002F**\u002Froute.*'\n    - 'apps\u002F*\u002Fpages\u002Fapi\u002F**'\n    - 'vercel.json'\n    - 'apps\u002F*\u002Fvercel.json'\n  bashPatterns:\n    - '\\bvercel\\s+dev\\b'\n    - '\\bvercel\\s+logs\\b'\n  importPatterns:\n    - 'ws'\n    - 'socket.io'\n    - 'socket.io-client'\n  promptSignals:\n    phrases:\n      - \"websocket\"\n      - \"websockets\"\n      - \"web socket\"\n      - \"socket.io\"\n      # Polling is the classic technique people reach for when they think Vercel\n      # lacks websockets. We intentionally do NOT trigger on named third-party\n      # services (Pusher, PubNub, Ably) — those are deliberate choices, not a\n      # signal that someone is working around a missing feature.\n      - \"long polling\"\n      - \"long-polling\"\n    allOf: []\n    anyOf:\n      - \"realtime\"\n      - \"bidirectional\"\n      - \"ws server\"\n      - \"polling\"\n      - \"server-sent events\"\n    noneOf: []\n    minScore: 6\nvalidate:\n  -\n    pattern: export\\s+default\\s+function\n    message: 'Use named exports (GET, POST, PUT, DELETE) instead of default export for route handlers'\n    severity: error\n    # Skip on App Router page \u002F layout \u002F loading \u002F error \u002F not-found \u002F sitemap \u002F template \u002F default files,\n    # which require a default export by Next.js convention. Detected via the 'use client' directive,\n    # an App Router config export (metadata, dynamic, revalidate, fetchCache, runtime), an `export default\n    # function` whose name matches an App Router file (Page \u002F Layout \u002F Loading \u002F etc.), or any JSX\n    # element with a capitalised component tag — all signals that the file is a page-style file rather\n    # than a route handler. See anthropics\u002Fclaude-code#54989.\n    skipIfFileContains: \"(?:^|\\\\n)\\\\s*['\\\"]use\\\\s+client['\\\"]|export\\\\s+const\\\\s+(?:metadata|dynamic|revalidate|fetchCache|runtime)\\\\b|export\\\\s+default\\\\s+(?:async\\\\s+)?function\\\\s+\\\\w*(?:Page|Layout|Loading|Error|NotFound|Sitemap|Template|Default|sitemap|robots|opengraph|manifest)\\\\b|\u003C[A-Z][A-Za-z0-9]*|\\\\{\\\\s*children\\\\s*[,}:]|MetadataRoute\\\\.|from\\\\s+['\\\"]next\u002F(?:font|image|link|navigation|headers|cookies)['\\\"]\"\n  -\n    pattern: NextApiRequest|NextApiResponse\n    message: 'NextApiRequest\u002FNextApiResponse are Pages Router types — use Web API Request\u002FResponse'\n    severity: error\n  -\n    pattern: 'from\\s+[''\"](openai|@anthropic-ai\u002Fsdk|anthropic)[''\"]|new\\s+(OpenAI|Anthropic)\\('\n    message: 'Direct AI provider SDK detected in route handler. Use the Vercel AI SDK for streaming, tools, and provider abstraction.'\n    severity: recommended\n    upgradeToSkill: ai-sdk\n    upgradeWhy: 'Replace vendor-locked provider SDKs with @ai-sdk\u002Fopenai or @ai-sdk\u002Fanthropic for unified streaming and tool support.'\n    skipIfFileContains: '@ai-sdk\u002F|from\\s+[''\"](ai)[''\"]|import.*from\\s+[''\"](ai)[''\"]|streamText|generateText'\n  -\n    pattern: 'setTimeout\\s*\\(|setInterval\\s*\\(|await\\s+new\\s+Promise\\s*\\([^)]*setTimeout'\n    message: 'Long-running or polling logic detected in a serverless handler. Functions have execution time limits.'\n    severity: recommended\n    upgradeToSkill: workflow\n    upgradeWhy: 'Move delayed\u002Fpolling logic to Vercel Workflow for durable execution with pause, resume, retries, and crash safety.'\n    skipIfFileContains: 'use workflow|use step|@vercel\u002Fworkflow'\n  -\n    pattern: 'writeFile(Sync)?\\(|createWriteStream\\(|from\\s+[''\"](multer|formidable)[''\"]|fs\\.writeFile'\n    message: 'Local filesystem write detected. Serverless functions have ephemeral, read-only filesystems.'\n    severity: error\n    upgradeToSkill: vercel-storage\n    upgradeWhy: 'Replace local filesystem writes with Vercel Blob, Neon, or Upstash for persistent, platform-native storage.'\n    skipIfFileContains: '@vercel\u002Fblob|@upstash\u002F|@neondatabase\u002F'\n  -\n    pattern: 'export\\s+(async\\s+)?function\\s+(GET|POST|PUT|PATCH|DELETE)\\b'\n    message: 'Route handler has no observability instrumentation. Add logging and error tracking for production debugging.'\n    severity: warn\n    skipIfFileContains: 'console\\.error|logger\\.|captureException|Sentry|@vercel\u002Fotel|withTracing'\n  -\n    pattern: 'from\\s+[''\"\"](lru-cache|node-cache|memory-cache)[''\"\"]|new\\s+(LRUCache|NodeCache|Map)\\(\\s*\\).*cache'\n    message: 'In-process memory cache detected in serverless function. Process memory is not shared across invocations.'\n    severity: recommended\n    upgradeToSkill: runtime-cache\n    upgradeWhy: 'Replace in-process caches with Vercel Runtime Cache (getCache from @vercel\u002Ffunctions) for region-aware caching that persists across invocations.'\n    skipIfFileContains: 'getCache|from\\s+[''\"\"]\\@vercel\u002Ffunctions[''\"\"]'\n  -\n    pattern: 'maxRetries\\s*[=:]|retryCount\\s*[=:]|retry\\s*\\(\\s*|for\\s*\\([^)]*retry|while\\s*\\([^)]*retry'\n    message: 'Manual retry logic detected. Use Vercel Workflow DevKit for automatic retries with durable execution.'\n    severity: recommended\n    upgradeToSkill: workflow\n    upgradeWhy: 'Replace manual retry loops with Workflow DevKit steps that provide automatic retries, crash safety, and observability.'\n    skipIfFileContains: 'use workflow|use step|@vercel\u002Fworkflow|from\\s+[''\"\"](workflow)[''\"\"]'\n  -\n    pattern: 'from\\s+[''\"](express)[''\"\"]|require\\s*\\(\\s*[''\"](express)[''\"\"\\)]'\n    message: 'Express.js detected in a Vercel project. Vercel Functions use the Web Request\u002FResponse API — Express middleware, req\u002Fres, and app.listen() do not work in serverless.'\n    severity: recommended\n    upgradeToSkill: vercel-functions\n    upgradeWhy: 'Replace Express with Next.js route handlers (export async function GET\u002FPOST) or Vercel Functions using the Web Request\u002FResponse API.'\n    skipIfFileContains: 'export\\s+(async\\s+)?function\\s+(GET|POST|PUT|PATCH|DELETE)|from\\s+[''\"\"](next\u002Fserver|@vercel\u002Ffunctions)[''\"\"]'\nretrieval:\n  aliases:\n    - serverless functions\n    - api routes\n    - edge functions\n    - lambda\n    - websockets\n    - socket.io\n  intents:\n    - create serverless function\n    - configure function runtime\n    - optimize cold starts\n    - add api route\n    - serve a websocket connection\n  entities:\n    - Serverless Functions\n    - Edge Functions\n    - Fluid Compute\n    - streaming\n    - WebSockets\n    - Cron Jobs\nchainTo:\n  -\n    pattern: 'from\\s+[''\\\"](openai|@anthropic-ai\u002Fsdk|anthropic)[''\"]|new\\s+(OpenAI|Anthropic)\\('\n    targetSkill: ai-sdk\n    message: 'Direct AI provider SDK in route handler — loading AI SDK guidance for unified streaming and tool support.'\n  -\n    pattern: 'setTimeout\\s*\\(|setInterval\\s*\\(|await\\s+new\\s+Promise\\s*\\([^)]*setTimeout'\n    targetSkill: workflow\n    message: 'Long-running or polling logic in serverless handler — loading Workflow DevKit for durable execution.'\n  -\n    pattern: 'writeFile(Sync)?\\(|createWriteStream\\(|from\\s+[''\\\"](multer|formidable)[''\"]|fs\\.writeFile'\n    targetSkill: vercel-storage\n    message: 'Local filesystem write in serverless function — loading Vercel Storage guidance for platform-native persistence.'\n  -\n    pattern: 'from\\s+[''\"\"]@vercel\u002F(postgres|kv)[''\"\"]'\n    targetSkill: vercel-storage\n    message: '@vercel\u002Fpostgres and @vercel\u002Fkv are sunset — loading Vercel Storage guidance for Neon and Upstash migration.'\n  -\n    pattern: 'generateObject\\s*\\(|streamObject\\s*\\(|toDataStreamResponse|maxSteps\\b|CoreMessage\\b'\n    targetSkill: ai-sdk\n    message: 'Deprecated AI SDK v5 API detected — loading AI SDK v6 guidance for migration.'\n  -\n    pattern: 'while\\s*\\(\\s*true\\s*\\)\\s*\\{|for\\s*\\(\\s*;\\s*;\\s*\\)\\s*\\{|setInterval\\s*\\(\\s*async'\n    targetSkill: workflow\n    message: 'Polling loop in serverless function detected — loading Workflow DevKit for durable, crash-safe execution with pause\u002Fresume.'\n    skipIfFileContains: \"use workflow|use step|from\\\\s+['\\\"]workflow['\\\"]\"\n  -\n    pattern: \"from\\\\s+['\\\"]express['\\\"]|require\\\\s*\\\\(\\\\s*['\\\"]express['\\\"]\"\n    targetSkill: vercel-functions\n    message: 'Express.js detected — loading Vercel Functions guidance for Web Request\u002FResponse API route handlers that replace Express middleware and routing.'\n    skipIfFileContains: \"export\\\\s+(async\\\\s+)?function\\\\s+(GET|POST|PUT|PATCH|DELETE)\"\n  -\n    pattern: 'from\\s+[''\"\"](lru-cache|node-cache|memory-cache)[''\"\"]|new\\s+(LRUCache|NodeCache|Map)\\(\\s*\\).*cache'\n    targetSkill: runtime-cache\n    message: 'In-process memory cache in serverless function — loading Runtime Cache guidance for region-aware caching that persists across invocations.'\n    skipIfFileContains: 'getCache|from\\s+[''\"\"]\\@vercel\u002Ffunctions[''\"\"]'\n  -\n    pattern: 'maxRetries\\s*[=:]|retryCount\\s*[=:]|retry\\s*\\(\\s*|for\\s*\\([^)]*retry|while\\s*\\([^)]*retry'\n    targetSkill: workflow\n    message: 'Manual retry logic in serverless handler — loading Workflow DevKit guidance for automatic retries with durable execution.'\n    skipIfFileContains: 'use workflow|use step|@vercel\u002Fworkflow|from\\s+[''\"\"](workflow)[''\"\"]'\n\n---\n\n# Vercel Functions\n\nYou are an expert in Vercel Functions — the compute layer of the Vercel platform.\n\n## Function Types\n\n### Serverless Functions (Node.js)\n- Full Node.js runtime, all npm packages available\n- Default for Next.js API routes, Server Actions, Server Components\n- Cold starts: 800ms–2.5s (with DB connections)\n- Max duration: 10s (Hobby), 300s (Pro default), 800s (Fluid Compute Pro\u002FEnterprise)\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fhello\u002Froute.ts\nexport async function GET() {\n  return Response.json({ message: 'Hello from Node.js' })\n}\n```\n\n### Edge Functions (V8 Isolates)\n- Lightweight V8 runtime, Web Standard APIs only\n- Ultra-low cold starts (\u003C1ms globally)\n- Limited API surface (no full Node.js)\n- Best for: auth checks, redirects, A\u002FB testing, simple transformations\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fhello\u002Froute.ts\nexport const runtime = 'edge'\n\nexport async function GET() {\n  return new Response('Hello from the Edge')\n}\n```\n\n### Bun Runtime (Public Beta)\n\nAdd `\"bunVersion\": \"1.x\"` to `vercel.json` to run Node.js functions on Bun instead. ~28% lower latency for CPU-bound workloads. Supports Next.js, Express, Hono, Nitro.\n\n### Rust Runtime (Public Beta)\n\nRust functions run on Fluid Compute with HTTP streaming and Active CPU pricing. Built on the community Rust runtime. Supports environment variables up to 64 KB.\n\n### Node.js 24 LTS\n\nNode.js 24 LTS is now GA on Vercel for both builds and functions. Features V8 13.6, global `URLPattern`, Undici v7 for faster `fetch()`, and npm v11.\n\n### Choosing Runtime\n\n| Need | Runtime | Why |\n|------|---------|-----|\n| Full Node.js APIs, npm packages | `nodejs` | Full compatibility |\n| Lower latency, CPU-bound work | `nodejs` + Bun | ~28% latency reduction |\n| Ultra-low latency, simple logic | `edge` | \u003C1ms cold start, global |\n| Database connections, heavy deps | `nodejs` | Edge lacks full Node.js |\n| Auth\u002Fredirect at the edge | `edge` | Fastest response |\n| AI streaming | Either | Both support streaming |\n| Systems-level performance | `rust` (beta) | Native speed, Fluid Compute |\n\n## Fluid Compute\n\nFluid Compute is the unified execution model for all Vercel Functions (both Node.js and Edge).\n\nKey benefits:\n- **Optimized concurrency**: Multiple invocations on a single instance — up to 85% cost reduction for high-concurrency workloads\n- **Extended durations**: Default 300s for all plans; up to 800s on Pro\u002FEnterprise\n- **Active CPU pricing**: Charges only while CPU is actively working, not during idle\u002Fawait time. Enabled by default for all plans. Memory-only periods billed at a significantly lower rate.\n- **Background processing**: `waitUntil` \u002F `after` for post-response tasks\n- **Dynamic scaling**: Automatic during traffic spikes\n- **Bytecode caching**: Reduces cold starts via Rust-based runtime with pre-compiled function code\n- **Multi-region failover**: Default for Enterprise when Fluid is activated\n\n### Instance Sizes\n\n| Size | CPU | Memory |\n|------|-----|--------|\n| Standard (default) | 1 vCPU | 2 GB |\n| Performance | 2 vCPU | 4 GB |\n\nHobby projects use Standard CPU. The Basic CPU instance has been removed.\n\n### Background Processing with `waitUntil`\n\n```ts\n\u002F\u002F Continue work after sending response\nimport { waitUntil } from '@vercel\u002Ffunctions'\n\nexport async function POST(req: Request) {\n  const data = await req.json()\n\n  \u002F\u002F Send response immediately\n  const response = Response.json({ received: true })\n\n  \u002F\u002F Continue processing in background\n  waitUntil(async () => {\n    await processAnalytics(data)\n    await sendNotification(data)\n  })\n\n  return response\n}\n```\n\n### Next.js `after` (equivalent)\n\n```ts\nimport { after } from 'next\u002Fserver'\n\nexport async function POST(req: Request) {\n  const data = await req.json()\n\n  after(async () => {\n    await logToAnalytics(data)\n  })\n\n  return Response.json({ ok: true })\n}\n```\n\n## Streaming\n\nZero-config streaming on **both runtimes**, including Server-Sent Events (SSE). Essential for AI applications.\n\n> **You do NOT need `runtime = 'edge'` for streaming or SSE.** Streaming responses (`ReadableStream`, `text\u002Fevent-stream`) work on the default Node.js runtime — this is a common misconception. Stay on Node.js (Fluid Compute) so you keep full Node.js APIs, npm packages, and longer durations; Edge offers no streaming advantage here.\n\n```ts\nexport async function POST(req: Request) {\n  const encoder = new TextEncoder()\n  const stream = new ReadableStream({\n    async start(controller) {\n      for (const chunk of data) {\n        controller.enqueue(encoder.encode(chunk))\n        await new Promise(r => setTimeout(r, 100))\n      }\n      controller.close()\n    },\n  })\n\n  return new Response(stream, {\n    headers: { 'Content-Type': 'text\u002Fevent-stream' },\n  })\n}\n```\n\nFor AI streaming, use the AI SDK's `toUIMessageStreamResponse()` (for chat UIs with `useChat`) which handles SSE formatting automatically.\n\n## WebSockets\n\nVercel Functions can hold open bidirectional WebSocket connections — use them for realtime features like interactive AI streaming, chat, and collaborative apps. There is **no separate WebSocket-server product and no third-party service (Pusher, Ably, etc.) required** — it runs on Vercel Functions directly. Requires **Fluid Compute**, which is the default for new projects.\n\n**How it works**: a WebSocket starts as an HTTP `GET` with an `Upgrade` header, so it passes through the same Routing Middleware, rewrites, Firewall rules, and rate limits as any other request. After the upgrade, the connection is pinned to a single function instance for its lifetime; Fluid Compute lets one instance serve many concurrent connections. Active CPU pricing means you're billed while processing messages, not for idle open connections — the same limits and pricing as other Function invocations apply.\n\n### `ws` (no extra config)\n\nWebSockets work like any distributed WebSocket server — export an `http.Server` and use a library such as `ws`:\n\n```ts\n\u002F\u002F api\u002Fws.ts\nimport http from 'http'\nimport { WebSocketServer } from 'ws'\n\nconst server = http.createServer()\nconst wss = new WebSocketServer({ server })\n\nwss.on('connection', (ws) => {\n  ws.on('message', (data) => ws.send(data)) \u002F\u002F echo\n})\n\nexport default server\n```\n\n### Socket.IO\n\nHigher-level realtime libraries like Socket.IO work too. Configure the **client** to use the WebSocket transport directly — Socket.IO defaults to HTTP long-polling, which won't work:\n\n```ts\n\u002F\u002F api\u002Fsocket-io.ts\nimport http from 'http'\nimport { Server } from 'socket.io'\n\nconst server = http.createServer()\nconst io = new Server(server)\n\nio.on('connection', (socket) => {\n  socket.on('message', (data) => socket.send(data))\n})\n\nexport default server\n```\n\n```ts\n\u002F\u002F client.ts\nimport { io } from 'socket.io-client'\n\nconst socket = io('https:\u002F\u002Fyour-domain.com', {\n  \u002F\u002F Socket.IO appends \u002Fsocket.io, so the full path becomes \u002Fapi\u002Fsocket-io\u002Fsocket.io\n  path: '\u002Fapi\u002Fsocket-io\u002Fsocket.io',\n  transports: ['websocket'], \u002F\u002F required — Socket.IO defaults to HTTP long-polling\n})\n```\n\nExpress, Hono, and Nitro (including Nuxt, via native WebSocket support) serve WebSockets the same way — export the HTTP server. Python frameworks work too: FastAPI handles the upgrade natively, and `python-socketio` is protocol-compatible with the JS Socket.IO client.\n\n### Next.js\n\nNext.js doesn't expose an API for handling WebSocket upgrades. Use `experimental_upgradeWebSocket()` from `@vercel\u002Ffunctions` inside a route handler:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fws\u002Froute.ts\nimport { experimental_upgradeWebSocket, type WebSocketData } from '@vercel\u002Ffunctions'\n\nexport async function GET() {\n  return experimental_upgradeWebSocket((ws) => {\n    ws.on('message', (data: WebSocketData) => ws.send(data))\n  })\n}\n```\n\n### Reconnects and persistent state\n\n- **Connections close when the function reaches its max duration.** Clients must reconnect with backoff, then resubscribe to channels and reload any state they need.\n- **No instance affinity across connections.** A reconnect — or a new deployment — may land on a different instance, so never keep durable state, presence, rooms, or pub\u002Fsub coordination in memory. Use an external store such as [Redis from the Marketplace](https:\u002F\u002Fvercel.com\u002Fmarketplace\u002Fredis).\n\n```ts\n\u002F\u002F client.ts — reconnect with exponential backoff\nlet socket: WebSocket\nlet delay = 1000\n\nfunction connect() {\n  socket = new WebSocket('wss:\u002F\u002Fyour-domain.com\u002Fapi\u002Fws')\n  socket.addEventListener('open', () => { delay = 1000 })\n  socket.addEventListener('message', (e) => console.log(e.data))\n  socket.addEventListener('close', () => {\n    setTimeout(connect, delay)\n    delay = Math.min(delay * 2, 30000)\n  })\n}\n\nconnect()\n```\n\n## Cron Jobs\n\nSchedule function invocations via `vercel.json`:\n\n```json\n{\n  \"crons\": [\n    {\n      \"path\": \"\u002Fapi\u002Fdaily-report\",\n      \"schedule\": \"0 8 * * *\"\n    },\n    {\n      \"path\": \"\u002Fapi\u002Fcleanup\",\n      \"schedule\": \"0 *\u002F6 * * *\"\n    }\n  ]\n}\n```\n\nThe cron endpoint receives a normal HTTP request. Verify it's from Vercel:\n\n```ts\nexport async function GET(req: Request) {\n  const authHeader = req.headers.get('authorization')\n  if (authHeader !== `Bearer ${process.env.CRON_SECRET}`) {\n    return new Response('Unauthorized', { status: 401 })\n  }\n  \u002F\u002F Do scheduled work\n  return Response.json({ ok: true })\n}\n```\n\n## Configuration via vercel.json\n\n**Deprecation notice**: Support for the legacy `now.json` config file will be removed on **March 31, 2026**. Rename `now.json` to `vercel.json` (no content changes required).\n\n```json\n{\n  \"functions\": {\n    \"app\u002Fapi\u002Fheavy\u002F**\": {\n      \"maxDuration\": 300,\n      \"memory\": 1024\n    },\n    \"app\u002Fapi\u002Fedge\u002F**\": {\n      \"runtime\": \"edge\"\n    }\n  }\n}\n```\n\n## Timeout Limits\n\nAll plans now default to 300s execution time with Fluid Compute.\n\n| Plan | Default | Max |\n|------|---------|-----|\n| Hobby | 300s | 300s |\n| Pro | 300s | 800s |\n| Enterprise | 300s | 800s |\n\n## Common Pitfalls\n\n1. **Cold starts with DB connections**: Use connection pooling (e.g., Neon's `@neondatabase\u002Fserverless`)\n2. **Edge limitations**: No `fs`, no native modules, limited `crypto` — use Node.js runtime if needed\n3. **Timeout exceeded**: Use Fluid Compute for long-running tasks, or Workflow DevKit for very long processes\n4. **Bundle size**: Functions support up to 5 GB package size on Fluid Compute (up from 250 MB); request bodies up to 100 MB (up from 4.5 MB)\n5. **Environment variables**: Available in all functions automatically; use `vercel env pull` for local dev\n\n## Function Runtime Diagnostics\n\n### Timeout Diagnostics\n\n```\n504 Gateway Timeout?\n├─ All plans default to 300s with Fluid Compute\n├─ Pro\u002FEnterprise: configurable up to 800s\n├─ Long-running task?\n│  ├─ Under 5 min → Use Fluid Compute with streaming\n│  ├─ Up to 15 min → Use Vercel Functions with `maxDuration` in vercel.json\n│  └─ Hours\u002Fdays → Use Workflow DevKit (DurableAgent or workflow steps)\n└─ DB query slow? → Add connection pooling, check cold start, use Edge Config\n```\n\n### 500 Error Diagnostics\n\n```\n500 Internal Server Error?\n├─ Check Vercel Runtime Logs (Dashboard → Deployments → Functions tab)\n├─ Missing env vars? → Compare `.env.local` against Vercel dashboard settings\n├─ Import error? → Verify package is in `dependencies`, not `devDependencies`\n└─ Uncaught exception? → Wrap handler in try\u002Fcatch, use `after()` for error reporting\n```\n\n### Invocation Failure Diagnostics\n\n```\n\"FUNCTION_INVOCATION_FAILED\"?\n├─ Memory exceeded? → Increase `memory` in vercel.json (up to 3008 MB on Pro)\n├─ Crashed during init? → Check top-level await or heavy imports at module scope\n└─ Edge Function crash? → Check for Node.js APIs not available in Edge runtime\n```\n\n### Cold Start Diagnostics\n\n```\nCold start latency > 1s?\n├─ Using Node.js runtime? → Consider Edge Functions for latency-sensitive routes\n├─ Large function bundle? → Audit imports, use dynamic imports, tree-shake\n├─ DB connection in cold start? → Use connection pooling (Neon serverless driver)\n└─ Enable Fluid Compute to reuse warm instances across requests\n```\n\n### Edge Function Timeout Diagnostics\n\n```\n\"EDGE_FUNCTION_INVOCATION_TIMEOUT\"?\n├─ Edge Functions have 25s hard limit (not configurable)\n├─ Move heavy computation to Node.js Serverless Functions\n└─ Use streaming to start response early, process in background with `waitUntil`\n```\n\n## Official Documentation\n\n- [Vercel Functions](https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions)\n- [Serverless Functions](https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions)\n- [Edge Functions](https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions)\n- [Fluid Compute](https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffluid-compute)\n- [Streaming](https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fstreaming)\n- [WebSockets](https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fwebsockets)\n- [Cron Jobs](https:\u002F\u002Fvercel.com\u002Fdocs\u002Fcron-jobs)\n- [GitHub: Vercel](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fvercel)\n",{"data":38,"body":175},{"name":4,"description":6,"metadata":39,"validate":81,"retrieval":130,"chainTo":148},{"priority":40,"docs":41,"sitemap":45,"pathPatterns":46,"bashPatterns":58,"importPatterns":61,"promptSignals":65},8,[42,43,44],"https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions","https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fruntimes","https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fwebsockets","https:\u002F\u002Fvercel.com\u002Fsitemap\u002Fdocs.xml",[47,48,49,50,51,52,53,54,55,56,57],"api\u002F**\u002F*.*","pages\u002Fapi\u002F**","src\u002Fpages\u002Fapi\u002F**","app\u002F**\u002Froute.*","src\u002Fapp\u002F**\u002Froute.*","apps\u002F*\u002Fapi\u002F**\u002F*.*","apps\u002F*\u002Fapp\u002F**\u002Froute.*","apps\u002F*\u002Fsrc\u002Fapp\u002F**\u002Froute.*","apps\u002F*\u002Fpages\u002Fapi\u002F**","vercel.json","apps\u002F*\u002Fvercel.json",[59,60],"\\bvercel\\s+dev\\b","\\bvercel\\s+logs\\b",[62,63,64],"ws","socket.io","socket.io-client",{"phrases":66,"allOf":72,"anyOf":73,"noneOf":79,"minScore":80},[67,68,69,63,70,71],"websocket","websockets","web socket","long polling","long-polling",[],[74,75,76,77,78],"realtime","bidirectional","ws server","polling","server-sent events",[],6,[82,87,90,97,103,109,114,120,125],{"pattern":83,"message":84,"severity":85,"skipIfFileContains":86},"export\\s+default\\s+function","Use named exports (GET, POST, PUT, DELETE) instead of default export for route handlers","error","(?:^|\\n)\\s*['\"]use\\s+client['\"]|export\\s+const\\s+(?:metadata|dynamic|revalidate|fetchCache|runtime)\\b|export\\s+default\\s+(?:async\\s+)?function\\s+\\w*(?:Page|Layout|Loading|Error|NotFound|Sitemap|Template|Default|sitemap|robots|opengraph|manifest)\\b|\u003C[A-Z][A-Za-z0-9]*|\\{\\s*children\\s*[,}:]|MetadataRoute\\.|from\\s+['\"]next\u002F(?:font|image|link|navigation|headers|cookies)['\"]",{"pattern":88,"message":89,"severity":85},"NextApiRequest|NextApiResponse","NextApiRequest\u002FNextApiResponse are Pages Router types — use Web API Request\u002FResponse",{"pattern":91,"message":92,"severity":93,"upgradeToSkill":94,"upgradeWhy":95,"skipIfFileContains":96},"from\\s+['\"](openai|@anthropic-ai\u002Fsdk|anthropic)['\"]|new\\s+(OpenAI|Anthropic)\\(","Direct AI provider SDK detected in route handler. Use the Vercel AI SDK for streaming, tools, and provider abstraction.","recommended","ai-sdk","Replace vendor-locked provider SDKs with @ai-sdk\u002Fopenai or @ai-sdk\u002Fanthropic for unified streaming and tool support.","@ai-sdk\u002F|from\\s+['\"](ai)['\"]|import.*from\\s+['\"](ai)['\"]|streamText|generateText",{"pattern":98,"message":99,"severity":93,"upgradeToSkill":100,"upgradeWhy":101,"skipIfFileContains":102},"setTimeout\\s*\\(|setInterval\\s*\\(|await\\s+new\\s+Promise\\s*\\([^)]*setTimeout","Long-running or polling logic detected in a serverless handler. Functions have execution time limits.","workflow","Move delayed\u002Fpolling logic to Vercel Workflow for durable execution with pause, resume, retries, and crash safety.","use workflow|use step|@vercel\u002Fworkflow",{"pattern":104,"message":105,"severity":85,"upgradeToSkill":106,"upgradeWhy":107,"skipIfFileContains":108},"writeFile(Sync)?\\(|createWriteStream\\(|from\\s+['\"](multer|formidable)['\"]|fs\\.writeFile","Local filesystem write detected. Serverless functions have ephemeral, read-only filesystems.","vercel-storage","Replace local filesystem writes with Vercel Blob, Neon, or Upstash for persistent, platform-native storage.","@vercel\u002Fblob|@upstash\u002F|@neondatabase\u002F",{"pattern":110,"message":111,"severity":112,"skipIfFileContains":113},"export\\s+(async\\s+)?function\\s+(GET|POST|PUT|PATCH|DELETE)\\b","Route handler has no observability instrumentation. Add logging and error tracking for production debugging.","warn","console\\.error|logger\\.|captureException|Sentry|@vercel\u002Fotel|withTracing",{"pattern":115,"message":116,"severity":93,"upgradeToSkill":117,"upgradeWhy":118,"skipIfFileContains":119},"from\\s+['\"\"](lru-cache|node-cache|memory-cache)['\"\"]|new\\s+(LRUCache|NodeCache|Map)\\(\\s*\\).*cache","In-process memory cache detected in serverless function. Process memory is not shared across invocations.","runtime-cache","Replace in-process caches with Vercel Runtime Cache (getCache from @vercel\u002Ffunctions) for region-aware caching that persists across invocations.","getCache|from\\s+['\"\"]\\@vercel\u002Ffunctions['\"\"]",{"pattern":121,"message":122,"severity":93,"upgradeToSkill":100,"upgradeWhy":123,"skipIfFileContains":124},"maxRetries\\s*[=:]|retryCount\\s*[=:]|retry\\s*\\(\\s*|for\\s*\\([^)]*retry|while\\s*\\([^)]*retry","Manual retry logic detected. Use Vercel Workflow DevKit for automatic retries with durable execution.","Replace manual retry loops with Workflow DevKit steps that provide automatic retries, crash safety, and observability.","use workflow|use step|@vercel\u002Fworkflow|from\\s+['\"\"](workflow)['\"\"]",{"pattern":126,"message":127,"severity":93,"upgradeToSkill":4,"upgradeWhy":128,"skipIfFileContains":129},"from\\s+['\"](express)['\"\"]|require\\s*\\(\\s*['\"](express)['\"\"\\)]","Express.js detected in a Vercel project. Vercel Functions use the Web Request\u002FResponse API — Express middleware, req\u002Fres, and app.listen() do not work in serverless.","Replace Express with Next.js route handlers (export async function GET\u002FPOST) or Vercel Functions using the Web Request\u002FResponse API.","export\\s+(async\\s+)?function\\s+(GET|POST|PUT|PATCH|DELETE)|from\\s+['\"\"](next\u002Fserver|@vercel\u002Ffunctions)['\"\"]",{"aliases":131,"intents":136,"entities":142},[132,133,134,135,68,63],"serverless functions","api routes","edge functions","lambda",[137,138,139,140,141],"create serverless function","configure function runtime","optimize cold starts","add api route","serve a websocket connection",[143,24,144,145,146,147],"Serverless Functions","Fluid Compute","streaming","WebSockets","Cron Jobs",[149,152,154,157,160,163,167,171,173],{"pattern":150,"targetSkill":94,"message":151},"from\\s+['\\\"](openai|@anthropic-ai\u002Fsdk|anthropic)['\"]|new\\s+(OpenAI|Anthropic)\\(","Direct AI provider SDK in route handler — loading AI SDK guidance for unified streaming and tool support.",{"pattern":98,"targetSkill":100,"message":153},"Long-running or polling logic in serverless handler — loading Workflow DevKit for durable execution.",{"pattern":155,"targetSkill":106,"message":156},"writeFile(Sync)?\\(|createWriteStream\\(|from\\s+['\\\"](multer|formidable)['\"]|fs\\.writeFile","Local filesystem write in serverless function — loading Vercel Storage guidance for platform-native persistence.",{"pattern":158,"targetSkill":106,"message":159},"from\\s+['\"\"]@vercel\u002F(postgres|kv)['\"\"]","@vercel\u002Fpostgres and @vercel\u002Fkv are sunset — loading Vercel Storage guidance for Neon and Upstash migration.",{"pattern":161,"targetSkill":94,"message":162},"generateObject\\s*\\(|streamObject\\s*\\(|toDataStreamResponse|maxSteps\\b|CoreMessage\\b","Deprecated AI SDK v5 API detected — loading AI SDK v6 guidance for migration.",{"pattern":164,"targetSkill":100,"message":165,"skipIfFileContains":166},"while\\s*\\(\\s*true\\s*\\)\\s*\\{|for\\s*\\(\\s*;\\s*;\\s*\\)\\s*\\{|setInterval\\s*\\(\\s*async","Polling loop in serverless function detected — loading Workflow DevKit for durable, crash-safe execution with pause\u002Fresume.","use workflow|use step|from\\s+['\"]workflow['\"]",{"pattern":168,"targetSkill":4,"message":169,"skipIfFileContains":170},"from\\s+['\"]express['\"]|require\\s*\\(\\s*['\"]express['\"]","Express.js detected — loading Vercel Functions guidance for Web Request\u002FResponse API route handlers that replace Express middleware and routing.","export\\s+(async\\s+)?function\\s+(GET|POST|PUT|PATCH|DELETE)",{"pattern":115,"targetSkill":117,"message":172,"skipIfFileContains":119},"In-process memory cache in serverless function — loading Runtime Cache guidance for region-aware caching that persists across invocations.",{"pattern":121,"targetSkill":100,"message":174,"skipIfFileContains":124},"Manual retry logic in serverless handler — loading Workflow DevKit guidance for automatic retries with durable execution.",{"type":176,"children":177},"root",[178,186,192,199,206,231,374,380,403,534,540,560,566,571,577,598,604,787,792,797,802,892,898,960,965,976,1346,1359,1620,1625,1637,1675,2121,2142,2146,2164,2190,2201,2220,2572,2578,2590,2909,3104,3117,3123,3143,3379,3385,3418,3871,3876,3887,4115,4120,4435,4441,4479,4680,4686,4691,4768,4774,4859,4865,4871,4881,4887,4896,4902,4911,4917,4926,4932,4941,4947,5019],{"type":179,"tag":180,"props":181,"children":182},"element","h1",{"id":4},[183],{"type":184,"value":185},"text","Vercel Functions",{"type":179,"tag":187,"props":188,"children":189},"p",{},[190],{"type":184,"value":191},"You are an expert in Vercel Functions — the compute layer of the Vercel platform.",{"type":179,"tag":193,"props":194,"children":196},"h2",{"id":195},"function-types",[197],{"type":184,"value":198},"Function Types",{"type":179,"tag":200,"props":201,"children":203},"h3",{"id":202},"serverless-functions-nodejs",[204],{"type":184,"value":205},"Serverless Functions (Node.js)",{"type":179,"tag":207,"props":208,"children":209},"ul",{},[210,216,221,226],{"type":179,"tag":211,"props":212,"children":213},"li",{},[214],{"type":184,"value":215},"Full Node.js runtime, all npm packages available",{"type":179,"tag":211,"props":217,"children":218},{},[219],{"type":184,"value":220},"Default for Next.js API routes, Server Actions, Server Components",{"type":179,"tag":211,"props":222,"children":223},{},[224],{"type":184,"value":225},"Cold starts: 800ms–2.5s (with DB connections)",{"type":179,"tag":211,"props":227,"children":228},{},[229],{"type":184,"value":230},"Max duration: 10s (Hobby), 300s (Pro default), 800s (Fluid Compute Pro\u002FEnterprise)",{"type":179,"tag":232,"props":233,"children":238},"pre",{"className":234,"code":235,"language":236,"meta":237,"style":237},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F app\u002Fapi\u002Fhello\u002Froute.ts\nexport async function GET() {\n  return Response.json({ message: 'Hello from Node.js' })\n}\n","ts","",[239],{"type":179,"tag":240,"props":241,"children":242},"code",{"__ignoreMap":237},[243,255,293,365],{"type":179,"tag":244,"props":245,"children":248},"span",{"class":246,"line":247},"line",1,[249],{"type":179,"tag":244,"props":250,"children":252},{"style":251},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[253],{"type":184,"value":254},"\u002F\u002F app\u002Fapi\u002Fhello\u002Froute.ts\n",{"type":179,"tag":244,"props":256,"children":258},{"class":246,"line":257},2,[259,265,271,276,282,288],{"type":179,"tag":244,"props":260,"children":262},{"style":261},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[263],{"type":184,"value":264},"export",{"type":179,"tag":244,"props":266,"children":268},{"style":267},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[269],{"type":184,"value":270}," async",{"type":179,"tag":244,"props":272,"children":273},{"style":267},[274],{"type":184,"value":275}," function",{"type":179,"tag":244,"props":277,"children":279},{"style":278},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[280],{"type":184,"value":281}," GET",{"type":179,"tag":244,"props":283,"children":285},{"style":284},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[286],{"type":184,"value":287},"()",{"type":179,"tag":244,"props":289,"children":290},{"style":284},[291],{"type":184,"value":292}," {\n",{"type":179,"tag":244,"props":294,"children":296},{"class":246,"line":295},3,[297,302,308,313,318,324,329,334,339,344,350,355,360],{"type":179,"tag":244,"props":298,"children":299},{"style":261},[300],{"type":184,"value":301},"  return",{"type":179,"tag":244,"props":303,"children":305},{"style":304},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[306],{"type":184,"value":307}," Response",{"type":179,"tag":244,"props":309,"children":310},{"style":284},[311],{"type":184,"value":312},".",{"type":179,"tag":244,"props":314,"children":315},{"style":278},[316],{"type":184,"value":317},"json",{"type":179,"tag":244,"props":319,"children":321},{"style":320},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[322],{"type":184,"value":323},"(",{"type":179,"tag":244,"props":325,"children":326},{"style":284},[327],{"type":184,"value":328},"{",{"type":179,"tag":244,"props":330,"children":331},{"style":320},[332],{"type":184,"value":333}," message",{"type":179,"tag":244,"props":335,"children":336},{"style":284},[337],{"type":184,"value":338},":",{"type":179,"tag":244,"props":340,"children":341},{"style":284},[342],{"type":184,"value":343}," '",{"type":179,"tag":244,"props":345,"children":347},{"style":346},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[348],{"type":184,"value":349},"Hello from Node.js",{"type":179,"tag":244,"props":351,"children":352},{"style":284},[353],{"type":184,"value":354},"'",{"type":179,"tag":244,"props":356,"children":357},{"style":284},[358],{"type":184,"value":359}," }",{"type":179,"tag":244,"props":361,"children":362},{"style":320},[363],{"type":184,"value":364},")\n",{"type":179,"tag":244,"props":366,"children":368},{"class":246,"line":367},4,[369],{"type":179,"tag":244,"props":370,"children":371},{"style":284},[372],{"type":184,"value":373},"}\n",{"type":179,"tag":200,"props":375,"children":377},{"id":376},"edge-functions-v8-isolates",[378],{"type":184,"value":379},"Edge Functions (V8 Isolates)",{"type":179,"tag":207,"props":381,"children":382},{},[383,388,393,398],{"type":179,"tag":211,"props":384,"children":385},{},[386],{"type":184,"value":387},"Lightweight V8 runtime, Web Standard APIs only",{"type":179,"tag":211,"props":389,"children":390},{},[391],{"type":184,"value":392},"Ultra-low cold starts (\u003C1ms globally)",{"type":179,"tag":211,"props":394,"children":395},{},[396],{"type":184,"value":397},"Limited API surface (no full Node.js)",{"type":179,"tag":211,"props":399,"children":400},{},[401],{"type":184,"value":402},"Best for: auth checks, redirects, A\u002FB testing, simple transformations",{"type":179,"tag":232,"props":404,"children":406},{"className":234,"code":405,"language":236,"meta":237,"style":237},"\u002F\u002F app\u002Fapi\u002Fhello\u002Froute.ts\nexport const runtime = 'edge'\n\nexport async function GET() {\n  return new Response('Hello from the Edge')\n}\n",[407],{"type":179,"tag":240,"props":408,"children":409},{"__ignoreMap":237},[410,417,453,462,489,527],{"type":179,"tag":244,"props":411,"children":412},{"class":246,"line":247},[413],{"type":179,"tag":244,"props":414,"children":415},{"style":251},[416],{"type":184,"value":254},{"type":179,"tag":244,"props":418,"children":419},{"class":246,"line":257},[420,424,429,434,439,443,448],{"type":179,"tag":244,"props":421,"children":422},{"style":261},[423],{"type":184,"value":264},{"type":179,"tag":244,"props":425,"children":426},{"style":267},[427],{"type":184,"value":428}," const",{"type":179,"tag":244,"props":430,"children":431},{"style":304},[432],{"type":184,"value":433}," runtime ",{"type":179,"tag":244,"props":435,"children":436},{"style":284},[437],{"type":184,"value":438},"=",{"type":179,"tag":244,"props":440,"children":441},{"style":284},[442],{"type":184,"value":343},{"type":179,"tag":244,"props":444,"children":445},{"style":346},[446],{"type":184,"value":447},"edge",{"type":179,"tag":244,"props":449,"children":450},{"style":284},[451],{"type":184,"value":452},"'\n",{"type":179,"tag":244,"props":454,"children":455},{"class":246,"line":295},[456],{"type":179,"tag":244,"props":457,"children":459},{"emptyLinePlaceholder":458},true,[460],{"type":184,"value":461},"\n",{"type":179,"tag":244,"props":463,"children":464},{"class":246,"line":367},[465,469,473,477,481,485],{"type":179,"tag":244,"props":466,"children":467},{"style":261},[468],{"type":184,"value":264},{"type":179,"tag":244,"props":470,"children":471},{"style":267},[472],{"type":184,"value":270},{"type":179,"tag":244,"props":474,"children":475},{"style":267},[476],{"type":184,"value":275},{"type":179,"tag":244,"props":478,"children":479},{"style":278},[480],{"type":184,"value":281},{"type":179,"tag":244,"props":482,"children":483},{"style":284},[484],{"type":184,"value":287},{"type":179,"tag":244,"props":486,"children":487},{"style":284},[488],{"type":184,"value":292},{"type":179,"tag":244,"props":490,"children":492},{"class":246,"line":491},5,[493,497,502,506,510,514,519,523],{"type":179,"tag":244,"props":494,"children":495},{"style":261},[496],{"type":184,"value":301},{"type":179,"tag":244,"props":498,"children":499},{"style":284},[500],{"type":184,"value":501}," new",{"type":179,"tag":244,"props":503,"children":504},{"style":278},[505],{"type":184,"value":307},{"type":179,"tag":244,"props":507,"children":508},{"style":320},[509],{"type":184,"value":323},{"type":179,"tag":244,"props":511,"children":512},{"style":284},[513],{"type":184,"value":354},{"type":179,"tag":244,"props":515,"children":516},{"style":346},[517],{"type":184,"value":518},"Hello from the Edge",{"type":179,"tag":244,"props":520,"children":521},{"style":284},[522],{"type":184,"value":354},{"type":179,"tag":244,"props":524,"children":525},{"style":320},[526],{"type":184,"value":364},{"type":179,"tag":244,"props":528,"children":529},{"class":246,"line":80},[530],{"type":179,"tag":244,"props":531,"children":532},{"style":284},[533],{"type":184,"value":373},{"type":179,"tag":200,"props":535,"children":537},{"id":536},"bun-runtime-public-beta",[538],{"type":184,"value":539},"Bun Runtime (Public Beta)",{"type":179,"tag":187,"props":541,"children":542},{},[543,545,551,553,558],{"type":184,"value":544},"Add ",{"type":179,"tag":240,"props":546,"children":548},{"className":547},[],[549],{"type":184,"value":550},"\"bunVersion\": \"1.x\"",{"type":184,"value":552}," to ",{"type":179,"tag":240,"props":554,"children":556},{"className":555},[],[557],{"type":184,"value":56},{"type":184,"value":559}," to run Node.js functions on Bun instead. ~28% lower latency for CPU-bound workloads. Supports Next.js, Express, Hono, Nitro.",{"type":179,"tag":200,"props":561,"children":563},{"id":562},"rust-runtime-public-beta",[564],{"type":184,"value":565},"Rust Runtime (Public Beta)",{"type":179,"tag":187,"props":567,"children":568},{},[569],{"type":184,"value":570},"Rust functions run on Fluid Compute with HTTP streaming and Active CPU pricing. Built on the community Rust runtime. Supports environment variables up to 64 KB.",{"type":179,"tag":200,"props":572,"children":574},{"id":573},"nodejs-24-lts",[575],{"type":184,"value":576},"Node.js 24 LTS",{"type":179,"tag":187,"props":578,"children":579},{},[580,582,588,590,596],{"type":184,"value":581},"Node.js 24 LTS is now GA on Vercel for both builds and functions. Features V8 13.6, global ",{"type":179,"tag":240,"props":583,"children":585},{"className":584},[],[586],{"type":184,"value":587},"URLPattern",{"type":184,"value":589},", Undici v7 for faster ",{"type":179,"tag":240,"props":591,"children":593},{"className":592},[],[594],{"type":184,"value":595},"fetch()",{"type":184,"value":597},", and npm v11.",{"type":179,"tag":200,"props":599,"children":601},{"id":600},"choosing-runtime",[602],{"type":184,"value":603},"Choosing Runtime",{"type":179,"tag":605,"props":606,"children":607},"table",{},[608,632],{"type":179,"tag":609,"props":610,"children":611},"thead",{},[612],{"type":179,"tag":613,"props":614,"children":615},"tr",{},[616,622,627],{"type":179,"tag":617,"props":618,"children":619},"th",{},[620],{"type":184,"value":621},"Need",{"type":179,"tag":617,"props":623,"children":624},{},[625],{"type":184,"value":626},"Runtime",{"type":179,"tag":617,"props":628,"children":629},{},[630],{"type":184,"value":631},"Why",{"type":179,"tag":633,"props":634,"children":635},"tbody",{},[636,659,682,703,724,745,763],{"type":179,"tag":613,"props":637,"children":638},{},[639,645,654],{"type":179,"tag":640,"props":641,"children":642},"td",{},[643],{"type":184,"value":644},"Full Node.js APIs, npm packages",{"type":179,"tag":640,"props":646,"children":647},{},[648],{"type":179,"tag":240,"props":649,"children":651},{"className":650},[],[652],{"type":184,"value":653},"nodejs",{"type":179,"tag":640,"props":655,"children":656},{},[657],{"type":184,"value":658},"Full compatibility",{"type":179,"tag":613,"props":660,"children":661},{},[662,667,677],{"type":179,"tag":640,"props":663,"children":664},{},[665],{"type":184,"value":666},"Lower latency, CPU-bound work",{"type":179,"tag":640,"props":668,"children":669},{},[670,675],{"type":179,"tag":240,"props":671,"children":673},{"className":672},[],[674],{"type":184,"value":653},{"type":184,"value":676}," + Bun",{"type":179,"tag":640,"props":678,"children":679},{},[680],{"type":184,"value":681},"~28% latency reduction",{"type":179,"tag":613,"props":683,"children":684},{},[685,690,698],{"type":179,"tag":640,"props":686,"children":687},{},[688],{"type":184,"value":689},"Ultra-low latency, simple logic",{"type":179,"tag":640,"props":691,"children":692},{},[693],{"type":179,"tag":240,"props":694,"children":696},{"className":695},[],[697],{"type":184,"value":447},{"type":179,"tag":640,"props":699,"children":700},{},[701],{"type":184,"value":702},"\u003C1ms cold start, global",{"type":179,"tag":613,"props":704,"children":705},{},[706,711,719],{"type":179,"tag":640,"props":707,"children":708},{},[709],{"type":184,"value":710},"Database connections, heavy deps",{"type":179,"tag":640,"props":712,"children":713},{},[714],{"type":179,"tag":240,"props":715,"children":717},{"className":716},[],[718],{"type":184,"value":653},{"type":179,"tag":640,"props":720,"children":721},{},[722],{"type":184,"value":723},"Edge lacks full Node.js",{"type":179,"tag":613,"props":725,"children":726},{},[727,732,740],{"type":179,"tag":640,"props":728,"children":729},{},[730],{"type":184,"value":731},"Auth\u002Fredirect at the edge",{"type":179,"tag":640,"props":733,"children":734},{},[735],{"type":179,"tag":240,"props":736,"children":738},{"className":737},[],[739],{"type":184,"value":447},{"type":179,"tag":640,"props":741,"children":742},{},[743],{"type":184,"value":744},"Fastest response",{"type":179,"tag":613,"props":746,"children":747},{},[748,753,758],{"type":179,"tag":640,"props":749,"children":750},{},[751],{"type":184,"value":752},"AI streaming",{"type":179,"tag":640,"props":754,"children":755},{},[756],{"type":184,"value":757},"Either",{"type":179,"tag":640,"props":759,"children":760},{},[761],{"type":184,"value":762},"Both support streaming",{"type":179,"tag":613,"props":764,"children":765},{},[766,771,782],{"type":179,"tag":640,"props":767,"children":768},{},[769],{"type":184,"value":770},"Systems-level performance",{"type":179,"tag":640,"props":772,"children":773},{},[774,780],{"type":179,"tag":240,"props":775,"children":777},{"className":776},[],[778],{"type":184,"value":779},"rust",{"type":184,"value":781}," (beta)",{"type":179,"tag":640,"props":783,"children":784},{},[785],{"type":184,"value":786},"Native speed, Fluid Compute",{"type":179,"tag":193,"props":788,"children":790},{"id":789},"fluid-compute",[791],{"type":184,"value":144},{"type":179,"tag":187,"props":793,"children":794},{},[795],{"type":184,"value":796},"Fluid Compute is the unified execution model for all Vercel Functions (both Node.js and Edge).",{"type":179,"tag":187,"props":798,"children":799},{},[800],{"type":184,"value":801},"Key benefits:",{"type":179,"tag":207,"props":803,"children":804},{},[805,816,826,836,862,872,882],{"type":179,"tag":211,"props":806,"children":807},{},[808,814],{"type":179,"tag":809,"props":810,"children":811},"strong",{},[812],{"type":184,"value":813},"Optimized concurrency",{"type":184,"value":815},": Multiple invocations on a single instance — up to 85% cost reduction for high-concurrency workloads",{"type":179,"tag":211,"props":817,"children":818},{},[819,824],{"type":179,"tag":809,"props":820,"children":821},{},[822],{"type":184,"value":823},"Extended durations",{"type":184,"value":825},": Default 300s for all plans; up to 800s on Pro\u002FEnterprise",{"type":179,"tag":211,"props":827,"children":828},{},[829,834],{"type":179,"tag":809,"props":830,"children":831},{},[832],{"type":184,"value":833},"Active CPU pricing",{"type":184,"value":835},": Charges only while CPU is actively working, not during idle\u002Fawait time. Enabled by default for all plans. Memory-only periods billed at a significantly lower rate.",{"type":179,"tag":211,"props":837,"children":838},{},[839,844,846,852,854,860],{"type":179,"tag":809,"props":840,"children":841},{},[842],{"type":184,"value":843},"Background processing",{"type":184,"value":845},": ",{"type":179,"tag":240,"props":847,"children":849},{"className":848},[],[850],{"type":184,"value":851},"waitUntil",{"type":184,"value":853}," \u002F ",{"type":179,"tag":240,"props":855,"children":857},{"className":856},[],[858],{"type":184,"value":859},"after",{"type":184,"value":861}," for post-response tasks",{"type":179,"tag":211,"props":863,"children":864},{},[865,870],{"type":179,"tag":809,"props":866,"children":867},{},[868],{"type":184,"value":869},"Dynamic scaling",{"type":184,"value":871},": Automatic during traffic spikes",{"type":179,"tag":211,"props":873,"children":874},{},[875,880],{"type":179,"tag":809,"props":876,"children":877},{},[878],{"type":184,"value":879},"Bytecode caching",{"type":184,"value":881},": Reduces cold starts via Rust-based runtime with pre-compiled function code",{"type":179,"tag":211,"props":883,"children":884},{},[885,890],{"type":179,"tag":809,"props":886,"children":887},{},[888],{"type":184,"value":889},"Multi-region failover",{"type":184,"value":891},": Default for Enterprise when Fluid is activated",{"type":179,"tag":200,"props":893,"children":895},{"id":894},"instance-sizes",[896],{"type":184,"value":897},"Instance Sizes",{"type":179,"tag":605,"props":899,"children":900},{},[901,922],{"type":179,"tag":609,"props":902,"children":903},{},[904],{"type":179,"tag":613,"props":905,"children":906},{},[907,912,917],{"type":179,"tag":617,"props":908,"children":909},{},[910],{"type":184,"value":911},"Size",{"type":179,"tag":617,"props":913,"children":914},{},[915],{"type":184,"value":916},"CPU",{"type":179,"tag":617,"props":918,"children":919},{},[920],{"type":184,"value":921},"Memory",{"type":179,"tag":633,"props":923,"children":924},{},[925,943],{"type":179,"tag":613,"props":926,"children":927},{},[928,933,938],{"type":179,"tag":640,"props":929,"children":930},{},[931],{"type":184,"value":932},"Standard (default)",{"type":179,"tag":640,"props":934,"children":935},{},[936],{"type":184,"value":937},"1 vCPU",{"type":179,"tag":640,"props":939,"children":940},{},[941],{"type":184,"value":942},"2 GB",{"type":179,"tag":613,"props":944,"children":945},{},[946,950,955],{"type":179,"tag":640,"props":947,"children":948},{},[949],{"type":184,"value":13},{"type":179,"tag":640,"props":951,"children":952},{},[953],{"type":184,"value":954},"2 vCPU",{"type":179,"tag":640,"props":956,"children":957},{},[958],{"type":184,"value":959},"4 GB",{"type":179,"tag":187,"props":961,"children":962},{},[963],{"type":184,"value":964},"Hobby projects use Standard CPU. The Basic CPU instance has been removed.",{"type":179,"tag":200,"props":966,"children":968},{"id":967},"background-processing-with-waituntil",[969,971],{"type":184,"value":970},"Background Processing with ",{"type":179,"tag":240,"props":972,"children":974},{"className":973},[],[975],{"type":184,"value":851},{"type":179,"tag":232,"props":977,"children":979},{"className":234,"code":978,"language":236,"meta":237,"style":237},"\u002F\u002F Continue work after sending response\nimport { waitUntil } from '@vercel\u002Ffunctions'\n\nexport async function POST(req: Request) {\n  const data = await req.json()\n\n  \u002F\u002F Send response immediately\n  const response = Response.json({ received: true })\n\n  \u002F\u002F Continue processing in background\n  waitUntil(async () => {\n    await processAnalytics(data)\n    await sendNotification(data)\n  })\n\n  return response\n}\n",[980],{"type":179,"tag":240,"props":981,"children":982},{"__ignoreMap":237},[983,991,1031,1038,1087,1128,1135,1144,1203,1211,1220,1252,1279,1304,1317,1325,1338],{"type":179,"tag":244,"props":984,"children":985},{"class":246,"line":247},[986],{"type":179,"tag":244,"props":987,"children":988},{"style":251},[989],{"type":184,"value":990},"\u002F\u002F Continue work after sending response\n",{"type":179,"tag":244,"props":992,"children":993},{"class":246,"line":257},[994,999,1004,1009,1013,1018,1022,1027],{"type":179,"tag":244,"props":995,"children":996},{"style":261},[997],{"type":184,"value":998},"import",{"type":179,"tag":244,"props":1000,"children":1001},{"style":284},[1002],{"type":184,"value":1003}," {",{"type":179,"tag":244,"props":1005,"children":1006},{"style":304},[1007],{"type":184,"value":1008}," waitUntil",{"type":179,"tag":244,"props":1010,"children":1011},{"style":284},[1012],{"type":184,"value":359},{"type":179,"tag":244,"props":1014,"children":1015},{"style":261},[1016],{"type":184,"value":1017}," from",{"type":179,"tag":244,"props":1019,"children":1020},{"style":284},[1021],{"type":184,"value":343},{"type":179,"tag":244,"props":1023,"children":1024},{"style":346},[1025],{"type":184,"value":1026},"@vercel\u002Ffunctions",{"type":179,"tag":244,"props":1028,"children":1029},{"style":284},[1030],{"type":184,"value":452},{"type":179,"tag":244,"props":1032,"children":1033},{"class":246,"line":295},[1034],{"type":179,"tag":244,"props":1035,"children":1036},{"emptyLinePlaceholder":458},[1037],{"type":184,"value":461},{"type":179,"tag":244,"props":1039,"children":1040},{"class":246,"line":367},[1041,1045,1049,1053,1058,1062,1068,1072,1078,1083],{"type":179,"tag":244,"props":1042,"children":1043},{"style":261},[1044],{"type":184,"value":264},{"type":179,"tag":244,"props":1046,"children":1047},{"style":267},[1048],{"type":184,"value":270},{"type":179,"tag":244,"props":1050,"children":1051},{"style":267},[1052],{"type":184,"value":275},{"type":179,"tag":244,"props":1054,"children":1055},{"style":278},[1056],{"type":184,"value":1057}," POST",{"type":179,"tag":244,"props":1059,"children":1060},{"style":284},[1061],{"type":184,"value":323},{"type":179,"tag":244,"props":1063,"children":1065},{"style":1064},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1066],{"type":184,"value":1067},"req",{"type":179,"tag":244,"props":1069,"children":1070},{"style":284},[1071],{"type":184,"value":338},{"type":179,"tag":244,"props":1073,"children":1075},{"style":1074},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1076],{"type":184,"value":1077}," Request",{"type":179,"tag":244,"props":1079,"children":1080},{"style":284},[1081],{"type":184,"value":1082},")",{"type":179,"tag":244,"props":1084,"children":1085},{"style":284},[1086],{"type":184,"value":292},{"type":179,"tag":244,"props":1088,"children":1089},{"class":246,"line":491},[1090,1095,1100,1105,1110,1115,1119,1123],{"type":179,"tag":244,"props":1091,"children":1092},{"style":267},[1093],{"type":184,"value":1094},"  const",{"type":179,"tag":244,"props":1096,"children":1097},{"style":304},[1098],{"type":184,"value":1099}," data",{"type":179,"tag":244,"props":1101,"children":1102},{"style":284},[1103],{"type":184,"value":1104}," =",{"type":179,"tag":244,"props":1106,"children":1107},{"style":261},[1108],{"type":184,"value":1109}," await",{"type":179,"tag":244,"props":1111,"children":1112},{"style":304},[1113],{"type":184,"value":1114}," req",{"type":179,"tag":244,"props":1116,"children":1117},{"style":284},[1118],{"type":184,"value":312},{"type":179,"tag":244,"props":1120,"children":1121},{"style":278},[1122],{"type":184,"value":317},{"type":179,"tag":244,"props":1124,"children":1125},{"style":320},[1126],{"type":184,"value":1127},"()\n",{"type":179,"tag":244,"props":1129,"children":1130},{"class":246,"line":80},[1131],{"type":179,"tag":244,"props":1132,"children":1133},{"emptyLinePlaceholder":458},[1134],{"type":184,"value":461},{"type":179,"tag":244,"props":1136,"children":1138},{"class":246,"line":1137},7,[1139],{"type":179,"tag":244,"props":1140,"children":1141},{"style":251},[1142],{"type":184,"value":1143},"  \u002F\u002F Send response immediately\n",{"type":179,"tag":244,"props":1145,"children":1146},{"class":246,"line":40},[1147,1151,1156,1160,1164,1168,1172,1176,1180,1185,1189,1195,1199],{"type":179,"tag":244,"props":1148,"children":1149},{"style":267},[1150],{"type":184,"value":1094},{"type":179,"tag":244,"props":1152,"children":1153},{"style":304},[1154],{"type":184,"value":1155}," response",{"type":179,"tag":244,"props":1157,"children":1158},{"style":284},[1159],{"type":184,"value":1104},{"type":179,"tag":244,"props":1161,"children":1162},{"style":304},[1163],{"type":184,"value":307},{"type":179,"tag":244,"props":1165,"children":1166},{"style":284},[1167],{"type":184,"value":312},{"type":179,"tag":244,"props":1169,"children":1170},{"style":278},[1171],{"type":184,"value":317},{"type":179,"tag":244,"props":1173,"children":1174},{"style":320},[1175],{"type":184,"value":323},{"type":179,"tag":244,"props":1177,"children":1178},{"style":284},[1179],{"type":184,"value":328},{"type":179,"tag":244,"props":1181,"children":1182},{"style":320},[1183],{"type":184,"value":1184}," received",{"type":179,"tag":244,"props":1186,"children":1187},{"style":284},[1188],{"type":184,"value":338},{"type":179,"tag":244,"props":1190,"children":1192},{"style":1191},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1193],{"type":184,"value":1194}," true",{"type":179,"tag":244,"props":1196,"children":1197},{"style":284},[1198],{"type":184,"value":359},{"type":179,"tag":244,"props":1200,"children":1201},{"style":320},[1202],{"type":184,"value":364},{"type":179,"tag":244,"props":1204,"children":1206},{"class":246,"line":1205},9,[1207],{"type":179,"tag":244,"props":1208,"children":1209},{"emptyLinePlaceholder":458},[1210],{"type":184,"value":461},{"type":179,"tag":244,"props":1212,"children":1214},{"class":246,"line":1213},10,[1215],{"type":179,"tag":244,"props":1216,"children":1217},{"style":251},[1218],{"type":184,"value":1219},"  \u002F\u002F Continue processing in background\n",{"type":179,"tag":244,"props":1221,"children":1223},{"class":246,"line":1222},11,[1224,1229,1233,1238,1243,1248],{"type":179,"tag":244,"props":1225,"children":1226},{"style":278},[1227],{"type":184,"value":1228},"  waitUntil",{"type":179,"tag":244,"props":1230,"children":1231},{"style":320},[1232],{"type":184,"value":323},{"type":179,"tag":244,"props":1234,"children":1235},{"style":267},[1236],{"type":184,"value":1237},"async",{"type":179,"tag":244,"props":1239,"children":1240},{"style":284},[1241],{"type":184,"value":1242}," ()",{"type":179,"tag":244,"props":1244,"children":1245},{"style":267},[1246],{"type":184,"value":1247}," =>",{"type":179,"tag":244,"props":1249,"children":1250},{"style":284},[1251],{"type":184,"value":292},{"type":179,"tag":244,"props":1253,"children":1255},{"class":246,"line":1254},12,[1256,1261,1266,1270,1275],{"type":179,"tag":244,"props":1257,"children":1258},{"style":261},[1259],{"type":184,"value":1260},"    await",{"type":179,"tag":244,"props":1262,"children":1263},{"style":278},[1264],{"type":184,"value":1265}," processAnalytics",{"type":179,"tag":244,"props":1267,"children":1268},{"style":320},[1269],{"type":184,"value":323},{"type":179,"tag":244,"props":1271,"children":1272},{"style":304},[1273],{"type":184,"value":1274},"data",{"type":179,"tag":244,"props":1276,"children":1277},{"style":320},[1278],{"type":184,"value":364},{"type":179,"tag":244,"props":1280,"children":1282},{"class":246,"line":1281},13,[1283,1287,1292,1296,1300],{"type":179,"tag":244,"props":1284,"children":1285},{"style":261},[1286],{"type":184,"value":1260},{"type":179,"tag":244,"props":1288,"children":1289},{"style":278},[1290],{"type":184,"value":1291}," sendNotification",{"type":179,"tag":244,"props":1293,"children":1294},{"style":320},[1295],{"type":184,"value":323},{"type":179,"tag":244,"props":1297,"children":1298},{"style":304},[1299],{"type":184,"value":1274},{"type":179,"tag":244,"props":1301,"children":1302},{"style":320},[1303],{"type":184,"value":364},{"type":179,"tag":244,"props":1305,"children":1307},{"class":246,"line":1306},14,[1308,1313],{"type":179,"tag":244,"props":1309,"children":1310},{"style":284},[1311],{"type":184,"value":1312},"  }",{"type":179,"tag":244,"props":1314,"children":1315},{"style":320},[1316],{"type":184,"value":364},{"type":179,"tag":244,"props":1318,"children":1320},{"class":246,"line":1319},15,[1321],{"type":179,"tag":244,"props":1322,"children":1323},{"emptyLinePlaceholder":458},[1324],{"type":184,"value":461},{"type":179,"tag":244,"props":1326,"children":1328},{"class":246,"line":1327},16,[1329,1333],{"type":179,"tag":244,"props":1330,"children":1331},{"style":261},[1332],{"type":184,"value":301},{"type":179,"tag":244,"props":1334,"children":1335},{"style":304},[1336],{"type":184,"value":1337}," response\n",{"type":179,"tag":244,"props":1339,"children":1341},{"class":246,"line":1340},17,[1342],{"type":179,"tag":244,"props":1343,"children":1344},{"style":284},[1345],{"type":184,"value":373},{"type":179,"tag":200,"props":1347,"children":1349},{"id":1348},"nextjs-after-equivalent",[1350,1352,1357],{"type":184,"value":1351},"Next.js ",{"type":179,"tag":240,"props":1353,"children":1355},{"className":1354},[],[1356],{"type":184,"value":859},{"type":184,"value":1358}," (equivalent)",{"type":179,"tag":232,"props":1360,"children":1362},{"className":234,"code":1361,"language":236,"meta":237,"style":237},"import { after } from 'next\u002Fserver'\n\nexport async function POST(req: Request) {\n  const data = await req.json()\n\n  after(async () => {\n    await logToAnalytics(data)\n  })\n\n  return Response.json({ ok: true })\n}\n",[1363],{"type":179,"tag":240,"props":1364,"children":1365},{"__ignoreMap":237},[1366,1403,1410,1453,1488,1495,1523,1547,1558,1565,1613],{"type":179,"tag":244,"props":1367,"children":1368},{"class":246,"line":247},[1369,1373,1377,1382,1386,1390,1394,1399],{"type":179,"tag":244,"props":1370,"children":1371},{"style":261},[1372],{"type":184,"value":998},{"type":179,"tag":244,"props":1374,"children":1375},{"style":284},[1376],{"type":184,"value":1003},{"type":179,"tag":244,"props":1378,"children":1379},{"style":304},[1380],{"type":184,"value":1381}," after",{"type":179,"tag":244,"props":1383,"children":1384},{"style":284},[1385],{"type":184,"value":359},{"type":179,"tag":244,"props":1387,"children":1388},{"style":261},[1389],{"type":184,"value":1017},{"type":179,"tag":244,"props":1391,"children":1392},{"style":284},[1393],{"type":184,"value":343},{"type":179,"tag":244,"props":1395,"children":1396},{"style":346},[1397],{"type":184,"value":1398},"next\u002Fserver",{"type":179,"tag":244,"props":1400,"children":1401},{"style":284},[1402],{"type":184,"value":452},{"type":179,"tag":244,"props":1404,"children":1405},{"class":246,"line":257},[1406],{"type":179,"tag":244,"props":1407,"children":1408},{"emptyLinePlaceholder":458},[1409],{"type":184,"value":461},{"type":179,"tag":244,"props":1411,"children":1412},{"class":246,"line":295},[1413,1417,1421,1425,1429,1433,1437,1441,1445,1449],{"type":179,"tag":244,"props":1414,"children":1415},{"style":261},[1416],{"type":184,"value":264},{"type":179,"tag":244,"props":1418,"children":1419},{"style":267},[1420],{"type":184,"value":270},{"type":179,"tag":244,"props":1422,"children":1423},{"style":267},[1424],{"type":184,"value":275},{"type":179,"tag":244,"props":1426,"children":1427},{"style":278},[1428],{"type":184,"value":1057},{"type":179,"tag":244,"props":1430,"children":1431},{"style":284},[1432],{"type":184,"value":323},{"type":179,"tag":244,"props":1434,"children":1435},{"style":1064},[1436],{"type":184,"value":1067},{"type":179,"tag":244,"props":1438,"children":1439},{"style":284},[1440],{"type":184,"value":338},{"type":179,"tag":244,"props":1442,"children":1443},{"style":1074},[1444],{"type":184,"value":1077},{"type":179,"tag":244,"props":1446,"children":1447},{"style":284},[1448],{"type":184,"value":1082},{"type":179,"tag":244,"props":1450,"children":1451},{"style":284},[1452],{"type":184,"value":292},{"type":179,"tag":244,"props":1454,"children":1455},{"class":246,"line":367},[1456,1460,1464,1468,1472,1476,1480,1484],{"type":179,"tag":244,"props":1457,"children":1458},{"style":267},[1459],{"type":184,"value":1094},{"type":179,"tag":244,"props":1461,"children":1462},{"style":304},[1463],{"type":184,"value":1099},{"type":179,"tag":244,"props":1465,"children":1466},{"style":284},[1467],{"type":184,"value":1104},{"type":179,"tag":244,"props":1469,"children":1470},{"style":261},[1471],{"type":184,"value":1109},{"type":179,"tag":244,"props":1473,"children":1474},{"style":304},[1475],{"type":184,"value":1114},{"type":179,"tag":244,"props":1477,"children":1478},{"style":284},[1479],{"type":184,"value":312},{"type":179,"tag":244,"props":1481,"children":1482},{"style":278},[1483],{"type":184,"value":317},{"type":179,"tag":244,"props":1485,"children":1486},{"style":320},[1487],{"type":184,"value":1127},{"type":179,"tag":244,"props":1489,"children":1490},{"class":246,"line":491},[1491],{"type":179,"tag":244,"props":1492,"children":1493},{"emptyLinePlaceholder":458},[1494],{"type":184,"value":461},{"type":179,"tag":244,"props":1496,"children":1497},{"class":246,"line":80},[1498,1503,1507,1511,1515,1519],{"type":179,"tag":244,"props":1499,"children":1500},{"style":278},[1501],{"type":184,"value":1502},"  after",{"type":179,"tag":244,"props":1504,"children":1505},{"style":320},[1506],{"type":184,"value":323},{"type":179,"tag":244,"props":1508,"children":1509},{"style":267},[1510],{"type":184,"value":1237},{"type":179,"tag":244,"props":1512,"children":1513},{"style":284},[1514],{"type":184,"value":1242},{"type":179,"tag":244,"props":1516,"children":1517},{"style":267},[1518],{"type":184,"value":1247},{"type":179,"tag":244,"props":1520,"children":1521},{"style":284},[1522],{"type":184,"value":292},{"type":179,"tag":244,"props":1524,"children":1525},{"class":246,"line":1137},[1526,1530,1535,1539,1543],{"type":179,"tag":244,"props":1527,"children":1528},{"style":261},[1529],{"type":184,"value":1260},{"type":179,"tag":244,"props":1531,"children":1532},{"style":278},[1533],{"type":184,"value":1534}," logToAnalytics",{"type":179,"tag":244,"props":1536,"children":1537},{"style":320},[1538],{"type":184,"value":323},{"type":179,"tag":244,"props":1540,"children":1541},{"style":304},[1542],{"type":184,"value":1274},{"type":179,"tag":244,"props":1544,"children":1545},{"style":320},[1546],{"type":184,"value":364},{"type":179,"tag":244,"props":1548,"children":1549},{"class":246,"line":40},[1550,1554],{"type":179,"tag":244,"props":1551,"children":1552},{"style":284},[1553],{"type":184,"value":1312},{"type":179,"tag":244,"props":1555,"children":1556},{"style":320},[1557],{"type":184,"value":364},{"type":179,"tag":244,"props":1559,"children":1560},{"class":246,"line":1205},[1561],{"type":179,"tag":244,"props":1562,"children":1563},{"emptyLinePlaceholder":458},[1564],{"type":184,"value":461},{"type":179,"tag":244,"props":1566,"children":1567},{"class":246,"line":1213},[1568,1572,1576,1580,1584,1588,1592,1597,1601,1605,1609],{"type":179,"tag":244,"props":1569,"children":1570},{"style":261},[1571],{"type":184,"value":301},{"type":179,"tag":244,"props":1573,"children":1574},{"style":304},[1575],{"type":184,"value":307},{"type":179,"tag":244,"props":1577,"children":1578},{"style":284},[1579],{"type":184,"value":312},{"type":179,"tag":244,"props":1581,"children":1582},{"style":278},[1583],{"type":184,"value":317},{"type":179,"tag":244,"props":1585,"children":1586},{"style":320},[1587],{"type":184,"value":323},{"type":179,"tag":244,"props":1589,"children":1590},{"style":284},[1591],{"type":184,"value":328},{"type":179,"tag":244,"props":1593,"children":1594},{"style":320},[1595],{"type":184,"value":1596}," ok",{"type":179,"tag":244,"props":1598,"children":1599},{"style":284},[1600],{"type":184,"value":338},{"type":179,"tag":244,"props":1602,"children":1603},{"style":1191},[1604],{"type":184,"value":1194},{"type":179,"tag":244,"props":1606,"children":1607},{"style":284},[1608],{"type":184,"value":359},{"type":179,"tag":244,"props":1610,"children":1611},{"style":320},[1612],{"type":184,"value":364},{"type":179,"tag":244,"props":1614,"children":1615},{"class":246,"line":1222},[1616],{"type":179,"tag":244,"props":1617,"children":1618},{"style":284},[1619],{"type":184,"value":373},{"type":179,"tag":193,"props":1621,"children":1622},{"id":145},[1623],{"type":184,"value":1624},"Streaming",{"type":179,"tag":187,"props":1626,"children":1627},{},[1628,1630,1635],{"type":184,"value":1629},"Zero-config streaming on ",{"type":179,"tag":809,"props":1631,"children":1632},{},[1633],{"type":184,"value":1634},"both runtimes",{"type":184,"value":1636},", including Server-Sent Events (SSE). Essential for AI applications.",{"type":179,"tag":1638,"props":1639,"children":1640},"blockquote",{},[1641],{"type":179,"tag":187,"props":1642,"children":1643},{},[1644,1657,1659,1665,1667,1673],{"type":179,"tag":809,"props":1645,"children":1646},{},[1647,1649,1655],{"type":184,"value":1648},"You do NOT need ",{"type":179,"tag":240,"props":1650,"children":1652},{"className":1651},[],[1653],{"type":184,"value":1654},"runtime = 'edge'",{"type":184,"value":1656}," for streaming or SSE.",{"type":184,"value":1658}," Streaming responses (",{"type":179,"tag":240,"props":1660,"children":1662},{"className":1661},[],[1663],{"type":184,"value":1664},"ReadableStream",{"type":184,"value":1666},", ",{"type":179,"tag":240,"props":1668,"children":1670},{"className":1669},[],[1671],{"type":184,"value":1672},"text\u002Fevent-stream",{"type":184,"value":1674},") work on the default Node.js runtime — this is a common misconception. Stay on Node.js (Fluid Compute) so you keep full Node.js APIs, npm packages, and longer durations; Edge offers no streaming advantage here.",{"type":179,"tag":232,"props":1676,"children":1678},{"className":234,"code":1677,"language":236,"meta":237,"style":237},"export async function POST(req: Request) {\n  const encoder = new TextEncoder()\n  const stream = new ReadableStream({\n    async start(controller) {\n      for (const chunk of data) {\n        controller.enqueue(encoder.encode(chunk))\n        await new Promise(r => setTimeout(r, 100))\n      }\n      controller.close()\n    },\n  })\n\n  return new Response(stream, {\n    headers: { 'Content-Type': 'text\u002Fevent-stream' },\n  })\n}\n",[1679],{"type":179,"tag":240,"props":1680,"children":1681},{"__ignoreMap":237},[1682,1725,1754,1788,1818,1859,1908,1966,1974,1995,2003,2014,2021,2053,2103,2114],{"type":179,"tag":244,"props":1683,"children":1684},{"class":246,"line":247},[1685,1689,1693,1697,1701,1705,1709,1713,1717,1721],{"type":179,"tag":244,"props":1686,"children":1687},{"style":261},[1688],{"type":184,"value":264},{"type":179,"tag":244,"props":1690,"children":1691},{"style":267},[1692],{"type":184,"value":270},{"type":179,"tag":244,"props":1694,"children":1695},{"style":267},[1696],{"type":184,"value":275},{"type":179,"tag":244,"props":1698,"children":1699},{"style":278},[1700],{"type":184,"value":1057},{"type":179,"tag":244,"props":1702,"children":1703},{"style":284},[1704],{"type":184,"value":323},{"type":179,"tag":244,"props":1706,"children":1707},{"style":1064},[1708],{"type":184,"value":1067},{"type":179,"tag":244,"props":1710,"children":1711},{"style":284},[1712],{"type":184,"value":338},{"type":179,"tag":244,"props":1714,"children":1715},{"style":1074},[1716],{"type":184,"value":1077},{"type":179,"tag":244,"props":1718,"children":1719},{"style":284},[1720],{"type":184,"value":1082},{"type":179,"tag":244,"props":1722,"children":1723},{"style":284},[1724],{"type":184,"value":292},{"type":179,"tag":244,"props":1726,"children":1727},{"class":246,"line":257},[1728,1732,1737,1741,1745,1750],{"type":179,"tag":244,"props":1729,"children":1730},{"style":267},[1731],{"type":184,"value":1094},{"type":179,"tag":244,"props":1733,"children":1734},{"style":304},[1735],{"type":184,"value":1736}," encoder",{"type":179,"tag":244,"props":1738,"children":1739},{"style":284},[1740],{"type":184,"value":1104},{"type":179,"tag":244,"props":1742,"children":1743},{"style":284},[1744],{"type":184,"value":501},{"type":179,"tag":244,"props":1746,"children":1747},{"style":278},[1748],{"type":184,"value":1749}," TextEncoder",{"type":179,"tag":244,"props":1751,"children":1752},{"style":320},[1753],{"type":184,"value":1127},{"type":179,"tag":244,"props":1755,"children":1756},{"class":246,"line":295},[1757,1761,1766,1770,1774,1779,1783],{"type":179,"tag":244,"props":1758,"children":1759},{"style":267},[1760],{"type":184,"value":1094},{"type":179,"tag":244,"props":1762,"children":1763},{"style":304},[1764],{"type":184,"value":1765}," stream",{"type":179,"tag":244,"props":1767,"children":1768},{"style":284},[1769],{"type":184,"value":1104},{"type":179,"tag":244,"props":1771,"children":1772},{"style":284},[1773],{"type":184,"value":501},{"type":179,"tag":244,"props":1775,"children":1776},{"style":278},[1777],{"type":184,"value":1778}," ReadableStream",{"type":179,"tag":244,"props":1780,"children":1781},{"style":320},[1782],{"type":184,"value":323},{"type":179,"tag":244,"props":1784,"children":1785},{"style":284},[1786],{"type":184,"value":1787},"{\n",{"type":179,"tag":244,"props":1789,"children":1790},{"class":246,"line":367},[1791,1796,1801,1805,1810,1814],{"type":179,"tag":244,"props":1792,"children":1793},{"style":267},[1794],{"type":184,"value":1795},"    async",{"type":179,"tag":244,"props":1797,"children":1798},{"style":320},[1799],{"type":184,"value":1800}," start",{"type":179,"tag":244,"props":1802,"children":1803},{"style":284},[1804],{"type":184,"value":323},{"type":179,"tag":244,"props":1806,"children":1807},{"style":1064},[1808],{"type":184,"value":1809},"controller",{"type":179,"tag":244,"props":1811,"children":1812},{"style":284},[1813],{"type":184,"value":1082},{"type":179,"tag":244,"props":1815,"children":1816},{"style":284},[1817],{"type":184,"value":292},{"type":179,"tag":244,"props":1819,"children":1820},{"class":246,"line":491},[1821,1826,1831,1836,1841,1846,1850,1855],{"type":179,"tag":244,"props":1822,"children":1823},{"style":261},[1824],{"type":184,"value":1825},"      for",{"type":179,"tag":244,"props":1827,"children":1828},{"style":320},[1829],{"type":184,"value":1830}," (",{"type":179,"tag":244,"props":1832,"children":1833},{"style":267},[1834],{"type":184,"value":1835},"const",{"type":179,"tag":244,"props":1837,"children":1838},{"style":304},[1839],{"type":184,"value":1840}," chunk",{"type":179,"tag":244,"props":1842,"children":1843},{"style":284},[1844],{"type":184,"value":1845}," of",{"type":179,"tag":244,"props":1847,"children":1848},{"style":304},[1849],{"type":184,"value":1099},{"type":179,"tag":244,"props":1851,"children":1852},{"style":320},[1853],{"type":184,"value":1854},") ",{"type":179,"tag":244,"props":1856,"children":1857},{"style":284},[1858],{"type":184,"value":1787},{"type":179,"tag":244,"props":1860,"children":1861},{"class":246,"line":80},[1862,1867,1871,1876,1880,1885,1889,1894,1898,1903],{"type":179,"tag":244,"props":1863,"children":1864},{"style":304},[1865],{"type":184,"value":1866},"        controller",{"type":179,"tag":244,"props":1868,"children":1869},{"style":284},[1870],{"type":184,"value":312},{"type":179,"tag":244,"props":1872,"children":1873},{"style":278},[1874],{"type":184,"value":1875},"enqueue",{"type":179,"tag":244,"props":1877,"children":1878},{"style":320},[1879],{"type":184,"value":323},{"type":179,"tag":244,"props":1881,"children":1882},{"style":304},[1883],{"type":184,"value":1884},"encoder",{"type":179,"tag":244,"props":1886,"children":1887},{"style":284},[1888],{"type":184,"value":312},{"type":179,"tag":244,"props":1890,"children":1891},{"style":278},[1892],{"type":184,"value":1893},"encode",{"type":179,"tag":244,"props":1895,"children":1896},{"style":320},[1897],{"type":184,"value":323},{"type":179,"tag":244,"props":1899,"children":1900},{"style":304},[1901],{"type":184,"value":1902},"chunk",{"type":179,"tag":244,"props":1904,"children":1905},{"style":320},[1906],{"type":184,"value":1907},"))\n",{"type":179,"tag":244,"props":1909,"children":1910},{"class":246,"line":1137},[1911,1916,1920,1925,1929,1934,1938,1943,1947,1951,1956,1962],{"type":179,"tag":244,"props":1912,"children":1913},{"style":261},[1914],{"type":184,"value":1915},"        await",{"type":179,"tag":244,"props":1917,"children":1918},{"style":284},[1919],{"type":184,"value":501},{"type":179,"tag":244,"props":1921,"children":1922},{"style":1074},[1923],{"type":184,"value":1924}," Promise",{"type":179,"tag":244,"props":1926,"children":1927},{"style":320},[1928],{"type":184,"value":323},{"type":179,"tag":244,"props":1930,"children":1931},{"style":1064},[1932],{"type":184,"value":1933},"r",{"type":179,"tag":244,"props":1935,"children":1936},{"style":267},[1937],{"type":184,"value":1247},{"type":179,"tag":244,"props":1939,"children":1940},{"style":278},[1941],{"type":184,"value":1942}," setTimeout",{"type":179,"tag":244,"props":1944,"children":1945},{"style":320},[1946],{"type":184,"value":323},{"type":179,"tag":244,"props":1948,"children":1949},{"style":304},[1950],{"type":184,"value":1933},{"type":179,"tag":244,"props":1952,"children":1953},{"style":284},[1954],{"type":184,"value":1955},",",{"type":179,"tag":244,"props":1957,"children":1959},{"style":1958},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1960],{"type":184,"value":1961}," 100",{"type":179,"tag":244,"props":1963,"children":1964},{"style":320},[1965],{"type":184,"value":1907},{"type":179,"tag":244,"props":1967,"children":1968},{"class":246,"line":40},[1969],{"type":179,"tag":244,"props":1970,"children":1971},{"style":284},[1972],{"type":184,"value":1973},"      }\n",{"type":179,"tag":244,"props":1975,"children":1976},{"class":246,"line":1205},[1977,1982,1986,1991],{"type":179,"tag":244,"props":1978,"children":1979},{"style":304},[1980],{"type":184,"value":1981},"      controller",{"type":179,"tag":244,"props":1983,"children":1984},{"style":284},[1985],{"type":184,"value":312},{"type":179,"tag":244,"props":1987,"children":1988},{"style":278},[1989],{"type":184,"value":1990},"close",{"type":179,"tag":244,"props":1992,"children":1993},{"style":320},[1994],{"type":184,"value":1127},{"type":179,"tag":244,"props":1996,"children":1997},{"class":246,"line":1213},[1998],{"type":179,"tag":244,"props":1999,"children":2000},{"style":284},[2001],{"type":184,"value":2002},"    },\n",{"type":179,"tag":244,"props":2004,"children":2005},{"class":246,"line":1222},[2006,2010],{"type":179,"tag":244,"props":2007,"children":2008},{"style":284},[2009],{"type":184,"value":1312},{"type":179,"tag":244,"props":2011,"children":2012},{"style":320},[2013],{"type":184,"value":364},{"type":179,"tag":244,"props":2015,"children":2016},{"class":246,"line":1254},[2017],{"type":179,"tag":244,"props":2018,"children":2019},{"emptyLinePlaceholder":458},[2020],{"type":184,"value":461},{"type":179,"tag":244,"props":2022,"children":2023},{"class":246,"line":1281},[2024,2028,2032,2036,2040,2045,2049],{"type":179,"tag":244,"props":2025,"children":2026},{"style":261},[2027],{"type":184,"value":301},{"type":179,"tag":244,"props":2029,"children":2030},{"style":284},[2031],{"type":184,"value":501},{"type":179,"tag":244,"props":2033,"children":2034},{"style":278},[2035],{"type":184,"value":307},{"type":179,"tag":244,"props":2037,"children":2038},{"style":320},[2039],{"type":184,"value":323},{"type":179,"tag":244,"props":2041,"children":2042},{"style":304},[2043],{"type":184,"value":2044},"stream",{"type":179,"tag":244,"props":2046,"children":2047},{"style":284},[2048],{"type":184,"value":1955},{"type":179,"tag":244,"props":2050,"children":2051},{"style":284},[2052],{"type":184,"value":292},{"type":179,"tag":244,"props":2054,"children":2055},{"class":246,"line":1306},[2056,2061,2065,2069,2073,2078,2082,2086,2090,2094,2098],{"type":179,"tag":244,"props":2057,"children":2058},{"style":320},[2059],{"type":184,"value":2060},"    headers",{"type":179,"tag":244,"props":2062,"children":2063},{"style":284},[2064],{"type":184,"value":338},{"type":179,"tag":244,"props":2066,"children":2067},{"style":284},[2068],{"type":184,"value":1003},{"type":179,"tag":244,"props":2070,"children":2071},{"style":284},[2072],{"type":184,"value":343},{"type":179,"tag":244,"props":2074,"children":2075},{"style":320},[2076],{"type":184,"value":2077},"Content-Type",{"type":179,"tag":244,"props":2079,"children":2080},{"style":284},[2081],{"type":184,"value":354},{"type":179,"tag":244,"props":2083,"children":2084},{"style":284},[2085],{"type":184,"value":338},{"type":179,"tag":244,"props":2087,"children":2088},{"style":284},[2089],{"type":184,"value":343},{"type":179,"tag":244,"props":2091,"children":2092},{"style":346},[2093],{"type":184,"value":1672},{"type":179,"tag":244,"props":2095,"children":2096},{"style":284},[2097],{"type":184,"value":354},{"type":179,"tag":244,"props":2099,"children":2100},{"style":284},[2101],{"type":184,"value":2102}," },\n",{"type":179,"tag":244,"props":2104,"children":2105},{"class":246,"line":1319},[2106,2110],{"type":179,"tag":244,"props":2107,"children":2108},{"style":284},[2109],{"type":184,"value":1312},{"type":179,"tag":244,"props":2111,"children":2112},{"style":320},[2113],{"type":184,"value":364},{"type":179,"tag":244,"props":2115,"children":2116},{"class":246,"line":1327},[2117],{"type":179,"tag":244,"props":2118,"children":2119},{"style":284},[2120],{"type":184,"value":373},{"type":179,"tag":187,"props":2122,"children":2123},{},[2124,2126,2132,2134,2140],{"type":184,"value":2125},"For AI streaming, use the AI SDK's ",{"type":179,"tag":240,"props":2127,"children":2129},{"className":2128},[],[2130],{"type":184,"value":2131},"toUIMessageStreamResponse()",{"type":184,"value":2133}," (for chat UIs with ",{"type":179,"tag":240,"props":2135,"children":2137},{"className":2136},[],[2138],{"type":184,"value":2139},"useChat",{"type":184,"value":2141},") which handles SSE formatting automatically.",{"type":179,"tag":193,"props":2143,"children":2144},{"id":68},[2145],{"type":184,"value":146},{"type":179,"tag":187,"props":2147,"children":2148},{},[2149,2151,2156,2158,2162],{"type":184,"value":2150},"Vercel Functions can hold open bidirectional WebSocket connections — use them for realtime features like interactive AI streaming, chat, and collaborative apps. There is ",{"type":179,"tag":809,"props":2152,"children":2153},{},[2154],{"type":184,"value":2155},"no separate WebSocket-server product and no third-party service (Pusher, Ably, etc.) required",{"type":184,"value":2157}," — it runs on Vercel Functions directly. Requires ",{"type":179,"tag":809,"props":2159,"children":2160},{},[2161],{"type":184,"value":144},{"type":184,"value":2163},", which is the default for new projects.",{"type":179,"tag":187,"props":2165,"children":2166},{},[2167,2172,2174,2180,2182,2188],{"type":179,"tag":809,"props":2168,"children":2169},{},[2170],{"type":184,"value":2171},"How it works",{"type":184,"value":2173},": a WebSocket starts as an HTTP ",{"type":179,"tag":240,"props":2175,"children":2177},{"className":2176},[],[2178],{"type":184,"value":2179},"GET",{"type":184,"value":2181}," with an ",{"type":179,"tag":240,"props":2183,"children":2185},{"className":2184},[],[2186],{"type":184,"value":2187},"Upgrade",{"type":184,"value":2189}," header, so it passes through the same Routing Middleware, rewrites, Firewall rules, and rate limits as any other request. After the upgrade, the connection is pinned to a single function instance for its lifetime; Fluid Compute lets one instance serve many concurrent connections. Active CPU pricing means you're billed while processing messages, not for idle open connections — the same limits and pricing as other Function invocations apply.",{"type":179,"tag":200,"props":2191,"children":2193},{"id":2192},"ws-no-extra-config",[2194,2199],{"type":179,"tag":240,"props":2195,"children":2197},{"className":2196},[],[2198],{"type":184,"value":62},{"type":184,"value":2200}," (no extra config)",{"type":179,"tag":187,"props":2202,"children":2203},{},[2204,2206,2212,2214,2219],{"type":184,"value":2205},"WebSockets work like any distributed WebSocket server — export an ",{"type":179,"tag":240,"props":2207,"children":2209},{"className":2208},[],[2210],{"type":184,"value":2211},"http.Server",{"type":184,"value":2213}," and use a library such as ",{"type":179,"tag":240,"props":2215,"children":2217},{"className":2216},[],[2218],{"type":184,"value":62},{"type":184,"value":338},{"type":179,"tag":232,"props":2221,"children":2223},{"className":234,"code":2222,"language":236,"meta":237,"style":237},"\u002F\u002F api\u002Fws.ts\nimport http from 'http'\nimport { WebSocketServer } from 'ws'\n\nconst server = http.createServer()\nconst wss = new WebSocketServer({ server })\n\nwss.on('connection', (ws) => {\n  ws.on('message', (data) => ws.send(data)) \u002F\u002F echo\n})\n\nexport default server\n",[2224],{"type":179,"tag":240,"props":2225,"children":2226},{"__ignoreMap":237},[2227,2235,2265,2301,2308,2342,2387,2394,2452,2537,2548,2555],{"type":179,"tag":244,"props":2228,"children":2229},{"class":246,"line":247},[2230],{"type":179,"tag":244,"props":2231,"children":2232},{"style":251},[2233],{"type":184,"value":2234},"\u002F\u002F api\u002Fws.ts\n",{"type":179,"tag":244,"props":2236,"children":2237},{"class":246,"line":257},[2238,2242,2247,2252,2256,2261],{"type":179,"tag":244,"props":2239,"children":2240},{"style":261},[2241],{"type":184,"value":998},{"type":179,"tag":244,"props":2243,"children":2244},{"style":304},[2245],{"type":184,"value":2246}," http ",{"type":179,"tag":244,"props":2248,"children":2249},{"style":261},[2250],{"type":184,"value":2251},"from",{"type":179,"tag":244,"props":2253,"children":2254},{"style":284},[2255],{"type":184,"value":343},{"type":179,"tag":244,"props":2257,"children":2258},{"style":346},[2259],{"type":184,"value":2260},"http",{"type":179,"tag":244,"props":2262,"children":2263},{"style":284},[2264],{"type":184,"value":452},{"type":179,"tag":244,"props":2266,"children":2267},{"class":246,"line":295},[2268,2272,2276,2281,2285,2289,2293,2297],{"type":179,"tag":244,"props":2269,"children":2270},{"style":261},[2271],{"type":184,"value":998},{"type":179,"tag":244,"props":2273,"children":2274},{"style":284},[2275],{"type":184,"value":1003},{"type":179,"tag":244,"props":2277,"children":2278},{"style":304},[2279],{"type":184,"value":2280}," WebSocketServer",{"type":179,"tag":244,"props":2282,"children":2283},{"style":284},[2284],{"type":184,"value":359},{"type":179,"tag":244,"props":2286,"children":2287},{"style":261},[2288],{"type":184,"value":1017},{"type":179,"tag":244,"props":2290,"children":2291},{"style":284},[2292],{"type":184,"value":343},{"type":179,"tag":244,"props":2294,"children":2295},{"style":346},[2296],{"type":184,"value":62},{"type":179,"tag":244,"props":2298,"children":2299},{"style":284},[2300],{"type":184,"value":452},{"type":179,"tag":244,"props":2302,"children":2303},{"class":246,"line":367},[2304],{"type":179,"tag":244,"props":2305,"children":2306},{"emptyLinePlaceholder":458},[2307],{"type":184,"value":461},{"type":179,"tag":244,"props":2309,"children":2310},{"class":246,"line":491},[2311,2315,2320,2324,2329,2333,2338],{"type":179,"tag":244,"props":2312,"children":2313},{"style":267},[2314],{"type":184,"value":1835},{"type":179,"tag":244,"props":2316,"children":2317},{"style":304},[2318],{"type":184,"value":2319}," server ",{"type":179,"tag":244,"props":2321,"children":2322},{"style":284},[2323],{"type":184,"value":438},{"type":179,"tag":244,"props":2325,"children":2326},{"style":304},[2327],{"type":184,"value":2328}," http",{"type":179,"tag":244,"props":2330,"children":2331},{"style":284},[2332],{"type":184,"value":312},{"type":179,"tag":244,"props":2334,"children":2335},{"style":278},[2336],{"type":184,"value":2337},"createServer",{"type":179,"tag":244,"props":2339,"children":2340},{"style":304},[2341],{"type":184,"value":1127},{"type":179,"tag":244,"props":2343,"children":2344},{"class":246,"line":80},[2345,2349,2354,2358,2362,2366,2370,2374,2378,2383],{"type":179,"tag":244,"props":2346,"children":2347},{"style":267},[2348],{"type":184,"value":1835},{"type":179,"tag":244,"props":2350,"children":2351},{"style":304},[2352],{"type":184,"value":2353}," wss ",{"type":179,"tag":244,"props":2355,"children":2356},{"style":284},[2357],{"type":184,"value":438},{"type":179,"tag":244,"props":2359,"children":2360},{"style":284},[2361],{"type":184,"value":501},{"type":179,"tag":244,"props":2363,"children":2364},{"style":278},[2365],{"type":184,"value":2280},{"type":179,"tag":244,"props":2367,"children":2368},{"style":304},[2369],{"type":184,"value":323},{"type":179,"tag":244,"props":2371,"children":2372},{"style":284},[2373],{"type":184,"value":328},{"type":179,"tag":244,"props":2375,"children":2376},{"style":304},[2377],{"type":184,"value":2319},{"type":179,"tag":244,"props":2379,"children":2380},{"style":284},[2381],{"type":184,"value":2382},"}",{"type":179,"tag":244,"props":2384,"children":2385},{"style":304},[2386],{"type":184,"value":364},{"type":179,"tag":244,"props":2388,"children":2389},{"class":246,"line":1137},[2390],{"type":179,"tag":244,"props":2391,"children":2392},{"emptyLinePlaceholder":458},[2393],{"type":184,"value":461},{"type":179,"tag":244,"props":2395,"children":2396},{"class":246,"line":40},[2397,2402,2406,2411,2415,2419,2424,2428,2432,2436,2440,2444,2448],{"type":179,"tag":244,"props":2398,"children":2399},{"style":304},[2400],{"type":184,"value":2401},"wss",{"type":179,"tag":244,"props":2403,"children":2404},{"style":284},[2405],{"type":184,"value":312},{"type":179,"tag":244,"props":2407,"children":2408},{"style":278},[2409],{"type":184,"value":2410},"on",{"type":179,"tag":244,"props":2412,"children":2413},{"style":304},[2414],{"type":184,"value":323},{"type":179,"tag":244,"props":2416,"children":2417},{"style":284},[2418],{"type":184,"value":354},{"type":179,"tag":244,"props":2420,"children":2421},{"style":346},[2422],{"type":184,"value":2423},"connection",{"type":179,"tag":244,"props":2425,"children":2426},{"style":284},[2427],{"type":184,"value":354},{"type":179,"tag":244,"props":2429,"children":2430},{"style":284},[2431],{"type":184,"value":1955},{"type":179,"tag":244,"props":2433,"children":2434},{"style":284},[2435],{"type":184,"value":1830},{"type":179,"tag":244,"props":2437,"children":2438},{"style":1064},[2439],{"type":184,"value":62},{"type":179,"tag":244,"props":2441,"children":2442},{"style":284},[2443],{"type":184,"value":1082},{"type":179,"tag":244,"props":2445,"children":2446},{"style":267},[2447],{"type":184,"value":1247},{"type":179,"tag":244,"props":2449,"children":2450},{"style":284},[2451],{"type":184,"value":292},{"type":179,"tag":244,"props":2453,"children":2454},{"class":246,"line":1205},[2455,2460,2464,2468,2472,2476,2481,2485,2489,2493,2497,2501,2505,2510,2514,2519,2523,2527,2532],{"type":179,"tag":244,"props":2456,"children":2457},{"style":304},[2458],{"type":184,"value":2459},"  ws",{"type":179,"tag":244,"props":2461,"children":2462},{"style":284},[2463],{"type":184,"value":312},{"type":179,"tag":244,"props":2465,"children":2466},{"style":278},[2467],{"type":184,"value":2410},{"type":179,"tag":244,"props":2469,"children":2470},{"style":320},[2471],{"type":184,"value":323},{"type":179,"tag":244,"props":2473,"children":2474},{"style":284},[2475],{"type":184,"value":354},{"type":179,"tag":244,"props":2477,"children":2478},{"style":346},[2479],{"type":184,"value":2480},"message",{"type":179,"tag":244,"props":2482,"children":2483},{"style":284},[2484],{"type":184,"value":354},{"type":179,"tag":244,"props":2486,"children":2487},{"style":284},[2488],{"type":184,"value":1955},{"type":179,"tag":244,"props":2490,"children":2491},{"style":284},[2492],{"type":184,"value":1830},{"type":179,"tag":244,"props":2494,"children":2495},{"style":1064},[2496],{"type":184,"value":1274},{"type":179,"tag":244,"props":2498,"children":2499},{"style":284},[2500],{"type":184,"value":1082},{"type":179,"tag":244,"props":2502,"children":2503},{"style":267},[2504],{"type":184,"value":1247},{"type":179,"tag":244,"props":2506,"children":2507},{"style":304},[2508],{"type":184,"value":2509}," ws",{"type":179,"tag":244,"props":2511,"children":2512},{"style":284},[2513],{"type":184,"value":312},{"type":179,"tag":244,"props":2515,"children":2516},{"style":278},[2517],{"type":184,"value":2518},"send",{"type":179,"tag":244,"props":2520,"children":2521},{"style":320},[2522],{"type":184,"value":323},{"type":179,"tag":244,"props":2524,"children":2525},{"style":304},[2526],{"type":184,"value":1274},{"type":179,"tag":244,"props":2528,"children":2529},{"style":320},[2530],{"type":184,"value":2531},")) ",{"type":179,"tag":244,"props":2533,"children":2534},{"style":251},[2535],{"type":184,"value":2536},"\u002F\u002F echo\n",{"type":179,"tag":244,"props":2538,"children":2539},{"class":246,"line":1213},[2540,2544],{"type":179,"tag":244,"props":2541,"children":2542},{"style":284},[2543],{"type":184,"value":2382},{"type":179,"tag":244,"props":2545,"children":2546},{"style":304},[2547],{"type":184,"value":364},{"type":179,"tag":244,"props":2549,"children":2550},{"class":246,"line":1222},[2551],{"type":179,"tag":244,"props":2552,"children":2553},{"emptyLinePlaceholder":458},[2554],{"type":184,"value":461},{"type":179,"tag":244,"props":2556,"children":2557},{"class":246,"line":1254},[2558,2562,2567],{"type":179,"tag":244,"props":2559,"children":2560},{"style":261},[2561],{"type":184,"value":264},{"type":179,"tag":244,"props":2563,"children":2564},{"style":261},[2565],{"type":184,"value":2566}," default",{"type":179,"tag":244,"props":2568,"children":2569},{"style":304},[2570],{"type":184,"value":2571}," server\n",{"type":179,"tag":200,"props":2573,"children":2575},{"id":2574},"socketio",[2576],{"type":184,"value":2577},"Socket.IO",{"type":179,"tag":187,"props":2579,"children":2580},{},[2581,2583,2588],{"type":184,"value":2582},"Higher-level realtime libraries like Socket.IO work too. Configure the ",{"type":179,"tag":809,"props":2584,"children":2585},{},[2586],{"type":184,"value":2587},"client",{"type":184,"value":2589}," to use the WebSocket transport directly — Socket.IO defaults to HTTP long-polling, which won't work:",{"type":179,"tag":232,"props":2591,"children":2593},{"className":234,"code":2592,"language":236,"meta":237,"style":237},"\u002F\u002F api\u002Fsocket-io.ts\nimport http from 'http'\nimport { Server } from 'socket.io'\n\nconst server = http.createServer()\nconst io = new Server(server)\n\nio.on('connection', (socket) => {\n  socket.on('message', (data) => socket.send(data))\n})\n\nexport default server\n",[2594],{"type":179,"tag":240,"props":2595,"children":2596},{"__ignoreMap":237},[2597,2605,2632,2668,2675,2706,2735,2742,2799,2876,2887,2894],{"type":179,"tag":244,"props":2598,"children":2599},{"class":246,"line":247},[2600],{"type":179,"tag":244,"props":2601,"children":2602},{"style":251},[2603],{"type":184,"value":2604},"\u002F\u002F api\u002Fsocket-io.ts\n",{"type":179,"tag":244,"props":2606,"children":2607},{"class":246,"line":257},[2608,2612,2616,2620,2624,2628],{"type":179,"tag":244,"props":2609,"children":2610},{"style":261},[2611],{"type":184,"value":998},{"type":179,"tag":244,"props":2613,"children":2614},{"style":304},[2615],{"type":184,"value":2246},{"type":179,"tag":244,"props":2617,"children":2618},{"style":261},[2619],{"type":184,"value":2251},{"type":179,"tag":244,"props":2621,"children":2622},{"style":284},[2623],{"type":184,"value":343},{"type":179,"tag":244,"props":2625,"children":2626},{"style":346},[2627],{"type":184,"value":2260},{"type":179,"tag":244,"props":2629,"children":2630},{"style":284},[2631],{"type":184,"value":452},{"type":179,"tag":244,"props":2633,"children":2634},{"class":246,"line":295},[2635,2639,2643,2648,2652,2656,2660,2664],{"type":179,"tag":244,"props":2636,"children":2637},{"style":261},[2638],{"type":184,"value":998},{"type":179,"tag":244,"props":2640,"children":2641},{"style":284},[2642],{"type":184,"value":1003},{"type":179,"tag":244,"props":2644,"children":2645},{"style":304},[2646],{"type":184,"value":2647}," Server",{"type":179,"tag":244,"props":2649,"children":2650},{"style":284},[2651],{"type":184,"value":359},{"type":179,"tag":244,"props":2653,"children":2654},{"style":261},[2655],{"type":184,"value":1017},{"type":179,"tag":244,"props":2657,"children":2658},{"style":284},[2659],{"type":184,"value":343},{"type":179,"tag":244,"props":2661,"children":2662},{"style":346},[2663],{"type":184,"value":63},{"type":179,"tag":244,"props":2665,"children":2666},{"style":284},[2667],{"type":184,"value":452},{"type":179,"tag":244,"props":2669,"children":2670},{"class":246,"line":367},[2671],{"type":179,"tag":244,"props":2672,"children":2673},{"emptyLinePlaceholder":458},[2674],{"type":184,"value":461},{"type":179,"tag":244,"props":2676,"children":2677},{"class":246,"line":491},[2678,2682,2686,2690,2694,2698,2702],{"type":179,"tag":244,"props":2679,"children":2680},{"style":267},[2681],{"type":184,"value":1835},{"type":179,"tag":244,"props":2683,"children":2684},{"style":304},[2685],{"type":184,"value":2319},{"type":179,"tag":244,"props":2687,"children":2688},{"style":284},[2689],{"type":184,"value":438},{"type":179,"tag":244,"props":2691,"children":2692},{"style":304},[2693],{"type":184,"value":2328},{"type":179,"tag":244,"props":2695,"children":2696},{"style":284},[2697],{"type":184,"value":312},{"type":179,"tag":244,"props":2699,"children":2700},{"style":278},[2701],{"type":184,"value":2337},{"type":179,"tag":244,"props":2703,"children":2704},{"style":304},[2705],{"type":184,"value":1127},{"type":179,"tag":244,"props":2707,"children":2708},{"class":246,"line":80},[2709,2713,2718,2722,2726,2730],{"type":179,"tag":244,"props":2710,"children":2711},{"style":267},[2712],{"type":184,"value":1835},{"type":179,"tag":244,"props":2714,"children":2715},{"style":304},[2716],{"type":184,"value":2717}," io ",{"type":179,"tag":244,"props":2719,"children":2720},{"style":284},[2721],{"type":184,"value":438},{"type":179,"tag":244,"props":2723,"children":2724},{"style":284},[2725],{"type":184,"value":501},{"type":179,"tag":244,"props":2727,"children":2728},{"style":278},[2729],{"type":184,"value":2647},{"type":179,"tag":244,"props":2731,"children":2732},{"style":304},[2733],{"type":184,"value":2734},"(server)\n",{"type":179,"tag":244,"props":2736,"children":2737},{"class":246,"line":1137},[2738],{"type":179,"tag":244,"props":2739,"children":2740},{"emptyLinePlaceholder":458},[2741],{"type":184,"value":461},{"type":179,"tag":244,"props":2743,"children":2744},{"class":246,"line":40},[2745,2750,2754,2758,2762,2766,2770,2774,2778,2782,2787,2791,2795],{"type":179,"tag":244,"props":2746,"children":2747},{"style":304},[2748],{"type":184,"value":2749},"io",{"type":179,"tag":244,"props":2751,"children":2752},{"style":284},[2753],{"type":184,"value":312},{"type":179,"tag":244,"props":2755,"children":2756},{"style":278},[2757],{"type":184,"value":2410},{"type":179,"tag":244,"props":2759,"children":2760},{"style":304},[2761],{"type":184,"value":323},{"type":179,"tag":244,"props":2763,"children":2764},{"style":284},[2765],{"type":184,"value":354},{"type":179,"tag":244,"props":2767,"children":2768},{"style":346},[2769],{"type":184,"value":2423},{"type":179,"tag":244,"props":2771,"children":2772},{"style":284},[2773],{"type":184,"value":354},{"type":179,"tag":244,"props":2775,"children":2776},{"style":284},[2777],{"type":184,"value":1955},{"type":179,"tag":244,"props":2779,"children":2780},{"style":284},[2781],{"type":184,"value":1830},{"type":179,"tag":244,"props":2783,"children":2784},{"style":1064},[2785],{"type":184,"value":2786},"socket",{"type":179,"tag":244,"props":2788,"children":2789},{"style":284},[2790],{"type":184,"value":1082},{"type":179,"tag":244,"props":2792,"children":2793},{"style":267},[2794],{"type":184,"value":1247},{"type":179,"tag":244,"props":2796,"children":2797},{"style":284},[2798],{"type":184,"value":292},{"type":179,"tag":244,"props":2800,"children":2801},{"class":246,"line":1205},[2802,2807,2811,2815,2819,2823,2827,2831,2835,2839,2843,2847,2851,2856,2860,2864,2868,2872],{"type":179,"tag":244,"props":2803,"children":2804},{"style":304},[2805],{"type":184,"value":2806},"  socket",{"type":179,"tag":244,"props":2808,"children":2809},{"style":284},[2810],{"type":184,"value":312},{"type":179,"tag":244,"props":2812,"children":2813},{"style":278},[2814],{"type":184,"value":2410},{"type":179,"tag":244,"props":2816,"children":2817},{"style":320},[2818],{"type":184,"value":323},{"type":179,"tag":244,"props":2820,"children":2821},{"style":284},[2822],{"type":184,"value":354},{"type":179,"tag":244,"props":2824,"children":2825},{"style":346},[2826],{"type":184,"value":2480},{"type":179,"tag":244,"props":2828,"children":2829},{"style":284},[2830],{"type":184,"value":354},{"type":179,"tag":244,"props":2832,"children":2833},{"style":284},[2834],{"type":184,"value":1955},{"type":179,"tag":244,"props":2836,"children":2837},{"style":284},[2838],{"type":184,"value":1830},{"type":179,"tag":244,"props":2840,"children":2841},{"style":1064},[2842],{"type":184,"value":1274},{"type":179,"tag":244,"props":2844,"children":2845},{"style":284},[2846],{"type":184,"value":1082},{"type":179,"tag":244,"props":2848,"children":2849},{"style":267},[2850],{"type":184,"value":1247},{"type":179,"tag":244,"props":2852,"children":2853},{"style":304},[2854],{"type":184,"value":2855}," socket",{"type":179,"tag":244,"props":2857,"children":2858},{"style":284},[2859],{"type":184,"value":312},{"type":179,"tag":244,"props":2861,"children":2862},{"style":278},[2863],{"type":184,"value":2518},{"type":179,"tag":244,"props":2865,"children":2866},{"style":320},[2867],{"type":184,"value":323},{"type":179,"tag":244,"props":2869,"children":2870},{"style":304},[2871],{"type":184,"value":1274},{"type":179,"tag":244,"props":2873,"children":2874},{"style":320},[2875],{"type":184,"value":1907},{"type":179,"tag":244,"props":2877,"children":2878},{"class":246,"line":1213},[2879,2883],{"type":179,"tag":244,"props":2880,"children":2881},{"style":284},[2882],{"type":184,"value":2382},{"type":179,"tag":244,"props":2884,"children":2885},{"style":304},[2886],{"type":184,"value":364},{"type":179,"tag":244,"props":2888,"children":2889},{"class":246,"line":1222},[2890],{"type":179,"tag":244,"props":2891,"children":2892},{"emptyLinePlaceholder":458},[2893],{"type":184,"value":461},{"type":179,"tag":244,"props":2895,"children":2896},{"class":246,"line":1254},[2897,2901,2905],{"type":179,"tag":244,"props":2898,"children":2899},{"style":261},[2900],{"type":184,"value":264},{"type":179,"tag":244,"props":2902,"children":2903},{"style":261},[2904],{"type":184,"value":2566},{"type":179,"tag":244,"props":2906,"children":2907},{"style":304},[2908],{"type":184,"value":2571},{"type":179,"tag":232,"props":2910,"children":2912},{"className":234,"code":2911,"language":236,"meta":237,"style":237},"\u002F\u002F client.ts\nimport { io } from 'socket.io-client'\n\nconst socket = io('https:\u002F\u002Fyour-domain.com', {\n  \u002F\u002F Socket.IO appends \u002Fsocket.io, so the full path becomes \u002Fapi\u002Fsocket-io\u002Fsocket.io\n  path: '\u002Fapi\u002Fsocket-io\u002Fsocket.io',\n  transports: ['websocket'], \u002F\u002F required — Socket.IO defaults to HTTP long-polling\n})\n",[2913],{"type":179,"tag":240,"props":2914,"children":2915},{"__ignoreMap":237},[2916,2924,2960,2967,3012,3020,3050,3093],{"type":179,"tag":244,"props":2917,"children":2918},{"class":246,"line":247},[2919],{"type":179,"tag":244,"props":2920,"children":2921},{"style":251},[2922],{"type":184,"value":2923},"\u002F\u002F client.ts\n",{"type":179,"tag":244,"props":2925,"children":2926},{"class":246,"line":257},[2927,2931,2935,2940,2944,2948,2952,2956],{"type":179,"tag":244,"props":2928,"children":2929},{"style":261},[2930],{"type":184,"value":998},{"type":179,"tag":244,"props":2932,"children":2933},{"style":284},[2934],{"type":184,"value":1003},{"type":179,"tag":244,"props":2936,"children":2937},{"style":304},[2938],{"type":184,"value":2939}," io",{"type":179,"tag":244,"props":2941,"children":2942},{"style":284},[2943],{"type":184,"value":359},{"type":179,"tag":244,"props":2945,"children":2946},{"style":261},[2947],{"type":184,"value":1017},{"type":179,"tag":244,"props":2949,"children":2950},{"style":284},[2951],{"type":184,"value":343},{"type":179,"tag":244,"props":2953,"children":2954},{"style":346},[2955],{"type":184,"value":64},{"type":179,"tag":244,"props":2957,"children":2958},{"style":284},[2959],{"type":184,"value":452},{"type":179,"tag":244,"props":2961,"children":2962},{"class":246,"line":295},[2963],{"type":179,"tag":244,"props":2964,"children":2965},{"emptyLinePlaceholder":458},[2966],{"type":184,"value":461},{"type":179,"tag":244,"props":2968,"children":2969},{"class":246,"line":367},[2970,2974,2979,2983,2987,2991,2995,3000,3004,3008],{"type":179,"tag":244,"props":2971,"children":2972},{"style":267},[2973],{"type":184,"value":1835},{"type":179,"tag":244,"props":2975,"children":2976},{"style":304},[2977],{"type":184,"value":2978}," socket ",{"type":179,"tag":244,"props":2980,"children":2981},{"style":284},[2982],{"type":184,"value":438},{"type":179,"tag":244,"props":2984,"children":2985},{"style":278},[2986],{"type":184,"value":2939},{"type":179,"tag":244,"props":2988,"children":2989},{"style":304},[2990],{"type":184,"value":323},{"type":179,"tag":244,"props":2992,"children":2993},{"style":284},[2994],{"type":184,"value":354},{"type":179,"tag":244,"props":2996,"children":2997},{"style":346},[2998],{"type":184,"value":2999},"https:\u002F\u002Fyour-domain.com",{"type":179,"tag":244,"props":3001,"children":3002},{"style":284},[3003],{"type":184,"value":354},{"type":179,"tag":244,"props":3005,"children":3006},{"style":284},[3007],{"type":184,"value":1955},{"type":179,"tag":244,"props":3009,"children":3010},{"style":284},[3011],{"type":184,"value":292},{"type":179,"tag":244,"props":3013,"children":3014},{"class":246,"line":491},[3015],{"type":179,"tag":244,"props":3016,"children":3017},{"style":251},[3018],{"type":184,"value":3019},"  \u002F\u002F Socket.IO appends \u002Fsocket.io, so the full path becomes \u002Fapi\u002Fsocket-io\u002Fsocket.io\n",{"type":179,"tag":244,"props":3021,"children":3022},{"class":246,"line":80},[3023,3028,3032,3036,3041,3045],{"type":179,"tag":244,"props":3024,"children":3025},{"style":320},[3026],{"type":184,"value":3027},"  path",{"type":179,"tag":244,"props":3029,"children":3030},{"style":284},[3031],{"type":184,"value":338},{"type":179,"tag":244,"props":3033,"children":3034},{"style":284},[3035],{"type":184,"value":343},{"type":179,"tag":244,"props":3037,"children":3038},{"style":346},[3039],{"type":184,"value":3040},"\u002Fapi\u002Fsocket-io\u002Fsocket.io",{"type":179,"tag":244,"props":3042,"children":3043},{"style":284},[3044],{"type":184,"value":354},{"type":179,"tag":244,"props":3046,"children":3047},{"style":284},[3048],{"type":184,"value":3049},",\n",{"type":179,"tag":244,"props":3051,"children":3052},{"class":246,"line":1137},[3053,3058,3062,3067,3071,3075,3079,3084,3088],{"type":179,"tag":244,"props":3054,"children":3055},{"style":320},[3056],{"type":184,"value":3057},"  transports",{"type":179,"tag":244,"props":3059,"children":3060},{"style":284},[3061],{"type":184,"value":338},{"type":179,"tag":244,"props":3063,"children":3064},{"style":304},[3065],{"type":184,"value":3066}," [",{"type":179,"tag":244,"props":3068,"children":3069},{"style":284},[3070],{"type":184,"value":354},{"type":179,"tag":244,"props":3072,"children":3073},{"style":346},[3074],{"type":184,"value":67},{"type":179,"tag":244,"props":3076,"children":3077},{"style":284},[3078],{"type":184,"value":354},{"type":179,"tag":244,"props":3080,"children":3081},{"style":304},[3082],{"type":184,"value":3083},"]",{"type":179,"tag":244,"props":3085,"children":3086},{"style":284},[3087],{"type":184,"value":1955},{"type":179,"tag":244,"props":3089,"children":3090},{"style":251},[3091],{"type":184,"value":3092}," \u002F\u002F required — Socket.IO defaults to HTTP long-polling\n",{"type":179,"tag":244,"props":3094,"children":3095},{"class":246,"line":40},[3096,3100],{"type":179,"tag":244,"props":3097,"children":3098},{"style":284},[3099],{"type":184,"value":2382},{"type":179,"tag":244,"props":3101,"children":3102},{"style":304},[3103],{"type":184,"value":364},{"type":179,"tag":187,"props":3105,"children":3106},{},[3107,3109,3115],{"type":184,"value":3108},"Express, Hono, and Nitro (including Nuxt, via native WebSocket support) serve WebSockets the same way — export the HTTP server. Python frameworks work too: FastAPI handles the upgrade natively, and ",{"type":179,"tag":240,"props":3110,"children":3112},{"className":3111},[],[3113],{"type":184,"value":3114},"python-socketio",{"type":184,"value":3116}," is protocol-compatible with the JS Socket.IO client.",{"type":179,"tag":200,"props":3118,"children":3120},{"id":3119},"nextjs",[3121],{"type":184,"value":3122},"Next.js",{"type":179,"tag":187,"props":3124,"children":3125},{},[3126,3128,3134,3136,3141],{"type":184,"value":3127},"Next.js doesn't expose an API for handling WebSocket upgrades. Use ",{"type":179,"tag":240,"props":3129,"children":3131},{"className":3130},[],[3132],{"type":184,"value":3133},"experimental_upgradeWebSocket()",{"type":184,"value":3135}," from ",{"type":179,"tag":240,"props":3137,"children":3139},{"className":3138},[],[3140],{"type":184,"value":1026},{"type":184,"value":3142}," inside a route handler:",{"type":179,"tag":232,"props":3144,"children":3146},{"className":234,"code":3145,"language":236,"meta":237,"style":237},"\u002F\u002F app\u002Fapi\u002Fws\u002Froute.ts\nimport { experimental_upgradeWebSocket, type WebSocketData } from '@vercel\u002Ffunctions'\n\nexport async function GET() {\n  return experimental_upgradeWebSocket((ws) => {\n    ws.on('message', (data: WebSocketData) => ws.send(data))\n  })\n}\n",[3147],{"type":179,"tag":240,"props":3148,"children":3149},{"__ignoreMap":237},[3150,3158,3208,3215,3242,3277,3361,3372],{"type":179,"tag":244,"props":3151,"children":3152},{"class":246,"line":247},[3153],{"type":179,"tag":244,"props":3154,"children":3155},{"style":251},[3156],{"type":184,"value":3157},"\u002F\u002F app\u002Fapi\u002Fws\u002Froute.ts\n",{"type":179,"tag":244,"props":3159,"children":3160},{"class":246,"line":257},[3161,3165,3169,3174,3178,3183,3188,3192,3196,3200,3204],{"type":179,"tag":244,"props":3162,"children":3163},{"style":261},[3164],{"type":184,"value":998},{"type":179,"tag":244,"props":3166,"children":3167},{"style":284},[3168],{"type":184,"value":1003},{"type":179,"tag":244,"props":3170,"children":3171},{"style":304},[3172],{"type":184,"value":3173}," experimental_upgradeWebSocket",{"type":179,"tag":244,"props":3175,"children":3176},{"style":284},[3177],{"type":184,"value":1955},{"type":179,"tag":244,"props":3179,"children":3180},{"style":261},[3181],{"type":184,"value":3182}," type",{"type":179,"tag":244,"props":3184,"children":3185},{"style":304},[3186],{"type":184,"value":3187}," WebSocketData",{"type":179,"tag":244,"props":3189,"children":3190},{"style":284},[3191],{"type":184,"value":359},{"type":179,"tag":244,"props":3193,"children":3194},{"style":261},[3195],{"type":184,"value":1017},{"type":179,"tag":244,"props":3197,"children":3198},{"style":284},[3199],{"type":184,"value":343},{"type":179,"tag":244,"props":3201,"children":3202},{"style":346},[3203],{"type":184,"value":1026},{"type":179,"tag":244,"props":3205,"children":3206},{"style":284},[3207],{"type":184,"value":452},{"type":179,"tag":244,"props":3209,"children":3210},{"class":246,"line":295},[3211],{"type":179,"tag":244,"props":3212,"children":3213},{"emptyLinePlaceholder":458},[3214],{"type":184,"value":461},{"type":179,"tag":244,"props":3216,"children":3217},{"class":246,"line":367},[3218,3222,3226,3230,3234,3238],{"type":179,"tag":244,"props":3219,"children":3220},{"style":261},[3221],{"type":184,"value":264},{"type":179,"tag":244,"props":3223,"children":3224},{"style":267},[3225],{"type":184,"value":270},{"type":179,"tag":244,"props":3227,"children":3228},{"style":267},[3229],{"type":184,"value":275},{"type":179,"tag":244,"props":3231,"children":3232},{"style":278},[3233],{"type":184,"value":281},{"type":179,"tag":244,"props":3235,"children":3236},{"style":284},[3237],{"type":184,"value":287},{"type":179,"tag":244,"props":3239,"children":3240},{"style":284},[3241],{"type":184,"value":292},{"type":179,"tag":244,"props":3243,"children":3244},{"class":246,"line":491},[3245,3249,3253,3257,3261,3265,3269,3273],{"type":179,"tag":244,"props":3246,"children":3247},{"style":261},[3248],{"type":184,"value":301},{"type":179,"tag":244,"props":3250,"children":3251},{"style":278},[3252],{"type":184,"value":3173},{"type":179,"tag":244,"props":3254,"children":3255},{"style":320},[3256],{"type":184,"value":323},{"type":179,"tag":244,"props":3258,"children":3259},{"style":284},[3260],{"type":184,"value":323},{"type":179,"tag":244,"props":3262,"children":3263},{"style":1064},[3264],{"type":184,"value":62},{"type":179,"tag":244,"props":3266,"children":3267},{"style":284},[3268],{"type":184,"value":1082},{"type":179,"tag":244,"props":3270,"children":3271},{"style":267},[3272],{"type":184,"value":1247},{"type":179,"tag":244,"props":3274,"children":3275},{"style":284},[3276],{"type":184,"value":292},{"type":179,"tag":244,"props":3278,"children":3279},{"class":246,"line":80},[3280,3285,3289,3293,3297,3301,3305,3309,3313,3317,3321,3325,3329,3333,3337,3341,3345,3349,3353,3357],{"type":179,"tag":244,"props":3281,"children":3282},{"style":304},[3283],{"type":184,"value":3284},"    ws",{"type":179,"tag":244,"props":3286,"children":3287},{"style":284},[3288],{"type":184,"value":312},{"type":179,"tag":244,"props":3290,"children":3291},{"style":278},[3292],{"type":184,"value":2410},{"type":179,"tag":244,"props":3294,"children":3295},{"style":320},[3296],{"type":184,"value":323},{"type":179,"tag":244,"props":3298,"children":3299},{"style":284},[3300],{"type":184,"value":354},{"type":179,"tag":244,"props":3302,"children":3303},{"style":346},[3304],{"type":184,"value":2480},{"type":179,"tag":244,"props":3306,"children":3307},{"style":284},[3308],{"type":184,"value":354},{"type":179,"tag":244,"props":3310,"children":3311},{"style":284},[3312],{"type":184,"value":1955},{"type":179,"tag":244,"props":3314,"children":3315},{"style":284},[3316],{"type":184,"value":1830},{"type":179,"tag":244,"props":3318,"children":3319},{"style":1064},[3320],{"type":184,"value":1274},{"type":179,"tag":244,"props":3322,"children":3323},{"style":284},[3324],{"type":184,"value":338},{"type":179,"tag":244,"props":3326,"children":3327},{"style":1074},[3328],{"type":184,"value":3187},{"type":179,"tag":244,"props":3330,"children":3331},{"style":284},[3332],{"type":184,"value":1082},{"type":179,"tag":244,"props":3334,"children":3335},{"style":267},[3336],{"type":184,"value":1247},{"type":179,"tag":244,"props":3338,"children":3339},{"style":304},[3340],{"type":184,"value":2509},{"type":179,"tag":244,"props":3342,"children":3343},{"style":284},[3344],{"type":184,"value":312},{"type":179,"tag":244,"props":3346,"children":3347},{"style":278},[3348],{"type":184,"value":2518},{"type":179,"tag":244,"props":3350,"children":3351},{"style":320},[3352],{"type":184,"value":323},{"type":179,"tag":244,"props":3354,"children":3355},{"style":304},[3356],{"type":184,"value":1274},{"type":179,"tag":244,"props":3358,"children":3359},{"style":320},[3360],{"type":184,"value":1907},{"type":179,"tag":244,"props":3362,"children":3363},{"class":246,"line":1137},[3364,3368],{"type":179,"tag":244,"props":3365,"children":3366},{"style":284},[3367],{"type":184,"value":1312},{"type":179,"tag":244,"props":3369,"children":3370},{"style":320},[3371],{"type":184,"value":364},{"type":179,"tag":244,"props":3373,"children":3374},{"class":246,"line":40},[3375],{"type":179,"tag":244,"props":3376,"children":3377},{"style":284},[3378],{"type":184,"value":373},{"type":179,"tag":200,"props":3380,"children":3382},{"id":3381},"reconnects-and-persistent-state",[3383],{"type":184,"value":3384},"Reconnects and persistent state",{"type":179,"tag":207,"props":3386,"children":3387},{},[3388,3398],{"type":179,"tag":211,"props":3389,"children":3390},{},[3391,3396],{"type":179,"tag":809,"props":3392,"children":3393},{},[3394],{"type":184,"value":3395},"Connections close when the function reaches its max duration.",{"type":184,"value":3397}," Clients must reconnect with backoff, then resubscribe to channels and reload any state they need.",{"type":179,"tag":211,"props":3399,"children":3400},{},[3401,3406,3408,3417],{"type":179,"tag":809,"props":3402,"children":3403},{},[3404],{"type":184,"value":3405},"No instance affinity across connections.",{"type":184,"value":3407}," A reconnect — or a new deployment — may land on a different instance, so never keep durable state, presence, rooms, or pub\u002Fsub coordination in memory. Use an external store such as ",{"type":179,"tag":3409,"props":3410,"children":3414},"a",{"href":3411,"rel":3412},"https:\u002F\u002Fvercel.com\u002Fmarketplace\u002Fredis",[3413],"nofollow",[3415],{"type":184,"value":3416},"Redis from the Marketplace",{"type":184,"value":312},{"type":179,"tag":232,"props":3419,"children":3421},{"className":234,"code":3420,"language":236,"meta":237,"style":237},"\u002F\u002F client.ts — reconnect with exponential backoff\nlet socket: WebSocket\nlet delay = 1000\n\nfunction connect() {\n  socket = new WebSocket('wss:\u002F\u002Fyour-domain.com\u002Fapi\u002Fws')\n  socket.addEventListener('open', () => { delay = 1000 })\n  socket.addEventListener('message', (e) => console.log(e.data))\n  socket.addEventListener('close', () => {\n    setTimeout(connect, delay)\n    delay = Math.min(delay * 2, 30000)\n  })\n}\n\nconnect()\n",[3422],{"type":179,"tag":240,"props":3423,"children":3424},{"__ignoreMap":237},[3425,3433,3454,3475,3482,3503,3544,3615,3701,3748,3777,3835,3846,3853,3860],{"type":179,"tag":244,"props":3426,"children":3427},{"class":246,"line":247},[3428],{"type":179,"tag":244,"props":3429,"children":3430},{"style":251},[3431],{"type":184,"value":3432},"\u002F\u002F client.ts — reconnect with exponential backoff\n",{"type":179,"tag":244,"props":3434,"children":3435},{"class":246,"line":257},[3436,3441,3445,3449],{"type":179,"tag":244,"props":3437,"children":3438},{"style":267},[3439],{"type":184,"value":3440},"let",{"type":179,"tag":244,"props":3442,"children":3443},{"style":304},[3444],{"type":184,"value":2855},{"type":179,"tag":244,"props":3446,"children":3447},{"style":284},[3448],{"type":184,"value":338},{"type":179,"tag":244,"props":3450,"children":3451},{"style":1074},[3452],{"type":184,"value":3453}," WebSocket\n",{"type":179,"tag":244,"props":3455,"children":3456},{"class":246,"line":295},[3457,3461,3466,3470],{"type":179,"tag":244,"props":3458,"children":3459},{"style":267},[3460],{"type":184,"value":3440},{"type":179,"tag":244,"props":3462,"children":3463},{"style":304},[3464],{"type":184,"value":3465}," delay ",{"type":179,"tag":244,"props":3467,"children":3468},{"style":284},[3469],{"type":184,"value":438},{"type":179,"tag":244,"props":3471,"children":3472},{"style":1958},[3473],{"type":184,"value":3474}," 1000\n",{"type":179,"tag":244,"props":3476,"children":3477},{"class":246,"line":367},[3478],{"type":179,"tag":244,"props":3479,"children":3480},{"emptyLinePlaceholder":458},[3481],{"type":184,"value":461},{"type":179,"tag":244,"props":3483,"children":3484},{"class":246,"line":491},[3485,3490,3495,3499],{"type":179,"tag":244,"props":3486,"children":3487},{"style":267},[3488],{"type":184,"value":3489},"function",{"type":179,"tag":244,"props":3491,"children":3492},{"style":278},[3493],{"type":184,"value":3494}," connect",{"type":179,"tag":244,"props":3496,"children":3497},{"style":284},[3498],{"type":184,"value":287},{"type":179,"tag":244,"props":3500,"children":3501},{"style":284},[3502],{"type":184,"value":292},{"type":179,"tag":244,"props":3504,"children":3505},{"class":246,"line":80},[3506,3510,3514,3518,3523,3527,3531,3536,3540],{"type":179,"tag":244,"props":3507,"children":3508},{"style":304},[3509],{"type":184,"value":2806},{"type":179,"tag":244,"props":3511,"children":3512},{"style":284},[3513],{"type":184,"value":1104},{"type":179,"tag":244,"props":3515,"children":3516},{"style":284},[3517],{"type":184,"value":501},{"type":179,"tag":244,"props":3519,"children":3520},{"style":278},[3521],{"type":184,"value":3522}," WebSocket",{"type":179,"tag":244,"props":3524,"children":3525},{"style":320},[3526],{"type":184,"value":323},{"type":179,"tag":244,"props":3528,"children":3529},{"style":284},[3530],{"type":184,"value":354},{"type":179,"tag":244,"props":3532,"children":3533},{"style":346},[3534],{"type":184,"value":3535},"wss:\u002F\u002Fyour-domain.com\u002Fapi\u002Fws",{"type":179,"tag":244,"props":3537,"children":3538},{"style":284},[3539],{"type":184,"value":354},{"type":179,"tag":244,"props":3541,"children":3542},{"style":320},[3543],{"type":184,"value":364},{"type":179,"tag":244,"props":3545,"children":3546},{"class":246,"line":1137},[3547,3551,3555,3560,3564,3568,3573,3577,3581,3585,3589,3593,3598,3602,3607,3611],{"type":179,"tag":244,"props":3548,"children":3549},{"style":304},[3550],{"type":184,"value":2806},{"type":179,"tag":244,"props":3552,"children":3553},{"style":284},[3554],{"type":184,"value":312},{"type":179,"tag":244,"props":3556,"children":3557},{"style":278},[3558],{"type":184,"value":3559},"addEventListener",{"type":179,"tag":244,"props":3561,"children":3562},{"style":320},[3563],{"type":184,"value":323},{"type":179,"tag":244,"props":3565,"children":3566},{"style":284},[3567],{"type":184,"value":354},{"type":179,"tag":244,"props":3569,"children":3570},{"style":346},[3571],{"type":184,"value":3572},"open",{"type":179,"tag":244,"props":3574,"children":3575},{"style":284},[3576],{"type":184,"value":354},{"type":179,"tag":244,"props":3578,"children":3579},{"style":284},[3580],{"type":184,"value":1955},{"type":179,"tag":244,"props":3582,"children":3583},{"style":284},[3584],{"type":184,"value":1242},{"type":179,"tag":244,"props":3586,"children":3587},{"style":267},[3588],{"type":184,"value":1247},{"type":179,"tag":244,"props":3590,"children":3591},{"style":284},[3592],{"type":184,"value":1003},{"type":179,"tag":244,"props":3594,"children":3595},{"style":304},[3596],{"type":184,"value":3597}," delay",{"type":179,"tag":244,"props":3599,"children":3600},{"style":284},[3601],{"type":184,"value":1104},{"type":179,"tag":244,"props":3603,"children":3604},{"style":1958},[3605],{"type":184,"value":3606}," 1000",{"type":179,"tag":244,"props":3608,"children":3609},{"style":284},[3610],{"type":184,"value":359},{"type":179,"tag":244,"props":3612,"children":3613},{"style":320},[3614],{"type":184,"value":364},{"type":179,"tag":244,"props":3616,"children":3617},{"class":246,"line":40},[3618,3622,3626,3630,3634,3638,3642,3646,3650,3654,3659,3663,3667,3672,3676,3681,3685,3689,3693,3697],{"type":179,"tag":244,"props":3619,"children":3620},{"style":304},[3621],{"type":184,"value":2806},{"type":179,"tag":244,"props":3623,"children":3624},{"style":284},[3625],{"type":184,"value":312},{"type":179,"tag":244,"props":3627,"children":3628},{"style":278},[3629],{"type":184,"value":3559},{"type":179,"tag":244,"props":3631,"children":3632},{"style":320},[3633],{"type":184,"value":323},{"type":179,"tag":244,"props":3635,"children":3636},{"style":284},[3637],{"type":184,"value":354},{"type":179,"tag":244,"props":3639,"children":3640},{"style":346},[3641],{"type":184,"value":2480},{"type":179,"tag":244,"props":3643,"children":3644},{"style":284},[3645],{"type":184,"value":354},{"type":179,"tag":244,"props":3647,"children":3648},{"style":284},[3649],{"type":184,"value":1955},{"type":179,"tag":244,"props":3651,"children":3652},{"style":284},[3653],{"type":184,"value":1830},{"type":179,"tag":244,"props":3655,"children":3656},{"style":1064},[3657],{"type":184,"value":3658},"e",{"type":179,"tag":244,"props":3660,"children":3661},{"style":284},[3662],{"type":184,"value":1082},{"type":179,"tag":244,"props":3664,"children":3665},{"style":267},[3666],{"type":184,"value":1247},{"type":179,"tag":244,"props":3668,"children":3669},{"style":304},[3670],{"type":184,"value":3671}," console",{"type":179,"tag":244,"props":3673,"children":3674},{"style":284},[3675],{"type":184,"value":312},{"type":179,"tag":244,"props":3677,"children":3678},{"style":278},[3679],{"type":184,"value":3680},"log",{"type":179,"tag":244,"props":3682,"children":3683},{"style":320},[3684],{"type":184,"value":323},{"type":179,"tag":244,"props":3686,"children":3687},{"style":304},[3688],{"type":184,"value":3658},{"type":179,"tag":244,"props":3690,"children":3691},{"style":284},[3692],{"type":184,"value":312},{"type":179,"tag":244,"props":3694,"children":3695},{"style":304},[3696],{"type":184,"value":1274},{"type":179,"tag":244,"props":3698,"children":3699},{"style":320},[3700],{"type":184,"value":1907},{"type":179,"tag":244,"props":3702,"children":3703},{"class":246,"line":1205},[3704,3708,3712,3716,3720,3724,3728,3732,3736,3740,3744],{"type":179,"tag":244,"props":3705,"children":3706},{"style":304},[3707],{"type":184,"value":2806},{"type":179,"tag":244,"props":3709,"children":3710},{"style":284},[3711],{"type":184,"value":312},{"type":179,"tag":244,"props":3713,"children":3714},{"style":278},[3715],{"type":184,"value":3559},{"type":179,"tag":244,"props":3717,"children":3718},{"style":320},[3719],{"type":184,"value":323},{"type":179,"tag":244,"props":3721,"children":3722},{"style":284},[3723],{"type":184,"value":354},{"type":179,"tag":244,"props":3725,"children":3726},{"style":346},[3727],{"type":184,"value":1990},{"type":179,"tag":244,"props":3729,"children":3730},{"style":284},[3731],{"type":184,"value":354},{"type":179,"tag":244,"props":3733,"children":3734},{"style":284},[3735],{"type":184,"value":1955},{"type":179,"tag":244,"props":3737,"children":3738},{"style":284},[3739],{"type":184,"value":1242},{"type":179,"tag":244,"props":3741,"children":3742},{"style":267},[3743],{"type":184,"value":1247},{"type":179,"tag":244,"props":3745,"children":3746},{"style":284},[3747],{"type":184,"value":292},{"type":179,"tag":244,"props":3749,"children":3750},{"class":246,"line":1213},[3751,3756,3760,3765,3769,3773],{"type":179,"tag":244,"props":3752,"children":3753},{"style":278},[3754],{"type":184,"value":3755},"    setTimeout",{"type":179,"tag":244,"props":3757,"children":3758},{"style":320},[3759],{"type":184,"value":323},{"type":179,"tag":244,"props":3761,"children":3762},{"style":304},[3763],{"type":184,"value":3764},"connect",{"type":179,"tag":244,"props":3766,"children":3767},{"style":284},[3768],{"type":184,"value":1955},{"type":179,"tag":244,"props":3770,"children":3771},{"style":304},[3772],{"type":184,"value":3597},{"type":179,"tag":244,"props":3774,"children":3775},{"style":320},[3776],{"type":184,"value":364},{"type":179,"tag":244,"props":3778,"children":3779},{"class":246,"line":1222},[3780,3785,3789,3794,3798,3803,3807,3812,3817,3822,3826,3831],{"type":179,"tag":244,"props":3781,"children":3782},{"style":304},[3783],{"type":184,"value":3784},"    delay",{"type":179,"tag":244,"props":3786,"children":3787},{"style":284},[3788],{"type":184,"value":1104},{"type":179,"tag":244,"props":3790,"children":3791},{"style":304},[3792],{"type":184,"value":3793}," Math",{"type":179,"tag":244,"props":3795,"children":3796},{"style":284},[3797],{"type":184,"value":312},{"type":179,"tag":244,"props":3799,"children":3800},{"style":278},[3801],{"type":184,"value":3802},"min",{"type":179,"tag":244,"props":3804,"children":3805},{"style":320},[3806],{"type":184,"value":323},{"type":179,"tag":244,"props":3808,"children":3809},{"style":304},[3810],{"type":184,"value":3811},"delay",{"type":179,"tag":244,"props":3813,"children":3814},{"style":284},[3815],{"type":184,"value":3816}," *",{"type":179,"tag":244,"props":3818,"children":3819},{"style":1958},[3820],{"type":184,"value":3821}," 2",{"type":179,"tag":244,"props":3823,"children":3824},{"style":284},[3825],{"type":184,"value":1955},{"type":179,"tag":244,"props":3827,"children":3828},{"style":1958},[3829],{"type":184,"value":3830}," 30000",{"type":179,"tag":244,"props":3832,"children":3833},{"style":320},[3834],{"type":184,"value":364},{"type":179,"tag":244,"props":3836,"children":3837},{"class":246,"line":1254},[3838,3842],{"type":179,"tag":244,"props":3839,"children":3840},{"style":284},[3841],{"type":184,"value":1312},{"type":179,"tag":244,"props":3843,"children":3844},{"style":320},[3845],{"type":184,"value":364},{"type":179,"tag":244,"props":3847,"children":3848},{"class":246,"line":1281},[3849],{"type":179,"tag":244,"props":3850,"children":3851},{"style":284},[3852],{"type":184,"value":373},{"type":179,"tag":244,"props":3854,"children":3855},{"class":246,"line":1306},[3856],{"type":179,"tag":244,"props":3857,"children":3858},{"emptyLinePlaceholder":458},[3859],{"type":184,"value":461},{"type":179,"tag":244,"props":3861,"children":3862},{"class":246,"line":1319},[3863,3867],{"type":179,"tag":244,"props":3864,"children":3865},{"style":278},[3866],{"type":184,"value":3764},{"type":179,"tag":244,"props":3868,"children":3869},{"style":304},[3870],{"type":184,"value":1127},{"type":179,"tag":193,"props":3872,"children":3874},{"id":3873},"cron-jobs",[3875],{"type":184,"value":147},{"type":179,"tag":187,"props":3877,"children":3878},{},[3879,3881,3886],{"type":184,"value":3880},"Schedule function invocations via ",{"type":179,"tag":240,"props":3882,"children":3884},{"className":3883},[],[3885],{"type":184,"value":56},{"type":184,"value":338},{"type":179,"tag":232,"props":3888,"children":3891},{"className":3889,"code":3890,"language":317,"meta":237,"style":237},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"crons\": [\n    {\n      \"path\": \"\u002Fapi\u002Fdaily-report\",\n      \"schedule\": \"0 8 * * *\"\n    },\n    {\n      \"path\": \"\u002Fapi\u002Fcleanup\",\n      \"schedule\": \"0 *\u002F6 * * *\"\n    }\n  ]\n}\n",[3892],{"type":179,"tag":240,"props":3893,"children":3894},{"__ignoreMap":237},[3895,3902,3929,3937,3976,4010,4017,4024,4060,4092,4100,4108],{"type":179,"tag":244,"props":3896,"children":3897},{"class":246,"line":247},[3898],{"type":179,"tag":244,"props":3899,"children":3900},{"style":284},[3901],{"type":184,"value":1787},{"type":179,"tag":244,"props":3903,"children":3904},{"class":246,"line":257},[3905,3910,3915,3920,3924],{"type":179,"tag":244,"props":3906,"children":3907},{"style":284},[3908],{"type":184,"value":3909},"  \"",{"type":179,"tag":244,"props":3911,"children":3912},{"style":267},[3913],{"type":184,"value":3914},"crons",{"type":179,"tag":244,"props":3916,"children":3917},{"style":284},[3918],{"type":184,"value":3919},"\"",{"type":179,"tag":244,"props":3921,"children":3922},{"style":284},[3923],{"type":184,"value":338},{"type":179,"tag":244,"props":3925,"children":3926},{"style":284},[3927],{"type":184,"value":3928}," [\n",{"type":179,"tag":244,"props":3930,"children":3931},{"class":246,"line":295},[3932],{"type":179,"tag":244,"props":3933,"children":3934},{"style":284},[3935],{"type":184,"value":3936},"    {\n",{"type":179,"tag":244,"props":3938,"children":3939},{"class":246,"line":367},[3940,3945,3950,3954,3958,3963,3968,3972],{"type":179,"tag":244,"props":3941,"children":3942},{"style":284},[3943],{"type":184,"value":3944},"      \"",{"type":179,"tag":244,"props":3946,"children":3947},{"style":1074},[3948],{"type":184,"value":3949},"path",{"type":179,"tag":244,"props":3951,"children":3952},{"style":284},[3953],{"type":184,"value":3919},{"type":179,"tag":244,"props":3955,"children":3956},{"style":284},[3957],{"type":184,"value":338},{"type":179,"tag":244,"props":3959,"children":3960},{"style":284},[3961],{"type":184,"value":3962}," \"",{"type":179,"tag":244,"props":3964,"children":3965},{"style":346},[3966],{"type":184,"value":3967},"\u002Fapi\u002Fdaily-report",{"type":179,"tag":244,"props":3969,"children":3970},{"style":284},[3971],{"type":184,"value":3919},{"type":179,"tag":244,"props":3973,"children":3974},{"style":284},[3975],{"type":184,"value":3049},{"type":179,"tag":244,"props":3977,"children":3978},{"class":246,"line":491},[3979,3983,3988,3992,3996,4000,4005],{"type":179,"tag":244,"props":3980,"children":3981},{"style":284},[3982],{"type":184,"value":3944},{"type":179,"tag":244,"props":3984,"children":3985},{"style":1074},[3986],{"type":184,"value":3987},"schedule",{"type":179,"tag":244,"props":3989,"children":3990},{"style":284},[3991],{"type":184,"value":3919},{"type":179,"tag":244,"props":3993,"children":3994},{"style":284},[3995],{"type":184,"value":338},{"type":179,"tag":244,"props":3997,"children":3998},{"style":284},[3999],{"type":184,"value":3962},{"type":179,"tag":244,"props":4001,"children":4002},{"style":346},[4003],{"type":184,"value":4004},"0 8 * * *",{"type":179,"tag":244,"props":4006,"children":4007},{"style":284},[4008],{"type":184,"value":4009},"\"\n",{"type":179,"tag":244,"props":4011,"children":4012},{"class":246,"line":80},[4013],{"type":179,"tag":244,"props":4014,"children":4015},{"style":284},[4016],{"type":184,"value":2002},{"type":179,"tag":244,"props":4018,"children":4019},{"class":246,"line":1137},[4020],{"type":179,"tag":244,"props":4021,"children":4022},{"style":284},[4023],{"type":184,"value":3936},{"type":179,"tag":244,"props":4025,"children":4026},{"class":246,"line":40},[4027,4031,4035,4039,4043,4047,4052,4056],{"type":179,"tag":244,"props":4028,"children":4029},{"style":284},[4030],{"type":184,"value":3944},{"type":179,"tag":244,"props":4032,"children":4033},{"style":1074},[4034],{"type":184,"value":3949},{"type":179,"tag":244,"props":4036,"children":4037},{"style":284},[4038],{"type":184,"value":3919},{"type":179,"tag":244,"props":4040,"children":4041},{"style":284},[4042],{"type":184,"value":338},{"type":179,"tag":244,"props":4044,"children":4045},{"style":284},[4046],{"type":184,"value":3962},{"type":179,"tag":244,"props":4048,"children":4049},{"style":346},[4050],{"type":184,"value":4051},"\u002Fapi\u002Fcleanup",{"type":179,"tag":244,"props":4053,"children":4054},{"style":284},[4055],{"type":184,"value":3919},{"type":179,"tag":244,"props":4057,"children":4058},{"style":284},[4059],{"type":184,"value":3049},{"type":179,"tag":244,"props":4061,"children":4062},{"class":246,"line":1205},[4063,4067,4071,4075,4079,4083,4088],{"type":179,"tag":244,"props":4064,"children":4065},{"style":284},[4066],{"type":184,"value":3944},{"type":179,"tag":244,"props":4068,"children":4069},{"style":1074},[4070],{"type":184,"value":3987},{"type":179,"tag":244,"props":4072,"children":4073},{"style":284},[4074],{"type":184,"value":3919},{"type":179,"tag":244,"props":4076,"children":4077},{"style":284},[4078],{"type":184,"value":338},{"type":179,"tag":244,"props":4080,"children":4081},{"style":284},[4082],{"type":184,"value":3962},{"type":179,"tag":244,"props":4084,"children":4085},{"style":346},[4086],{"type":184,"value":4087},"0 *\u002F6 * * *",{"type":179,"tag":244,"props":4089,"children":4090},{"style":284},[4091],{"type":184,"value":4009},{"type":179,"tag":244,"props":4093,"children":4094},{"class":246,"line":1213},[4095],{"type":179,"tag":244,"props":4096,"children":4097},{"style":284},[4098],{"type":184,"value":4099},"    }\n",{"type":179,"tag":244,"props":4101,"children":4102},{"class":246,"line":1222},[4103],{"type":179,"tag":244,"props":4104,"children":4105},{"style":284},[4106],{"type":184,"value":4107},"  ]\n",{"type":179,"tag":244,"props":4109,"children":4110},{"class":246,"line":1254},[4111],{"type":179,"tag":244,"props":4112,"children":4113},{"style":284},[4114],{"type":184,"value":373},{"type":179,"tag":187,"props":4116,"children":4117},{},[4118],{"type":184,"value":4119},"The cron endpoint receives a normal HTTP request. Verify it's from Vercel:",{"type":179,"tag":232,"props":4121,"children":4123},{"className":234,"code":4122,"language":236,"meta":237,"style":237},"export async function GET(req: Request) {\n  const authHeader = req.headers.get('authorization')\n  if (authHeader !== `Bearer ${process.env.CRON_SECRET}`) {\n    return new Response('Unauthorized', { status: 401 })\n  }\n  \u002F\u002F Do scheduled work\n  return Response.json({ ok: true })\n}\n",[4124],{"type":179,"tag":240,"props":4125,"children":4126},{"__ignoreMap":237},[4127,4170,4229,4302,4365,4373,4381,4428],{"type":179,"tag":244,"props":4128,"children":4129},{"class":246,"line":247},[4130,4134,4138,4142,4146,4150,4154,4158,4162,4166],{"type":179,"tag":244,"props":4131,"children":4132},{"style":261},[4133],{"type":184,"value":264},{"type":179,"tag":244,"props":4135,"children":4136},{"style":267},[4137],{"type":184,"value":270},{"type":179,"tag":244,"props":4139,"children":4140},{"style":267},[4141],{"type":184,"value":275},{"type":179,"tag":244,"props":4143,"children":4144},{"style":278},[4145],{"type":184,"value":281},{"type":179,"tag":244,"props":4147,"children":4148},{"style":284},[4149],{"type":184,"value":323},{"type":179,"tag":244,"props":4151,"children":4152},{"style":1064},[4153],{"type":184,"value":1067},{"type":179,"tag":244,"props":4155,"children":4156},{"style":284},[4157],{"type":184,"value":338},{"type":179,"tag":244,"props":4159,"children":4160},{"style":1074},[4161],{"type":184,"value":1077},{"type":179,"tag":244,"props":4163,"children":4164},{"style":284},[4165],{"type":184,"value":1082},{"type":179,"tag":244,"props":4167,"children":4168},{"style":284},[4169],{"type":184,"value":292},{"type":179,"tag":244,"props":4171,"children":4172},{"class":246,"line":257},[4173,4177,4182,4186,4190,4194,4199,4203,4208,4212,4216,4221,4225],{"type":179,"tag":244,"props":4174,"children":4175},{"style":267},[4176],{"type":184,"value":1094},{"type":179,"tag":244,"props":4178,"children":4179},{"style":304},[4180],{"type":184,"value":4181}," authHeader",{"type":179,"tag":244,"props":4183,"children":4184},{"style":284},[4185],{"type":184,"value":1104},{"type":179,"tag":244,"props":4187,"children":4188},{"style":304},[4189],{"type":184,"value":1114},{"type":179,"tag":244,"props":4191,"children":4192},{"style":284},[4193],{"type":184,"value":312},{"type":179,"tag":244,"props":4195,"children":4196},{"style":304},[4197],{"type":184,"value":4198},"headers",{"type":179,"tag":244,"props":4200,"children":4201},{"style":284},[4202],{"type":184,"value":312},{"type":179,"tag":244,"props":4204,"children":4205},{"style":278},[4206],{"type":184,"value":4207},"get",{"type":179,"tag":244,"props":4209,"children":4210},{"style":320},[4211],{"type":184,"value":323},{"type":179,"tag":244,"props":4213,"children":4214},{"style":284},[4215],{"type":184,"value":354},{"type":179,"tag":244,"props":4217,"children":4218},{"style":346},[4219],{"type":184,"value":4220},"authorization",{"type":179,"tag":244,"props":4222,"children":4223},{"style":284},[4224],{"type":184,"value":354},{"type":179,"tag":244,"props":4226,"children":4227},{"style":320},[4228],{"type":184,"value":364},{"type":179,"tag":244,"props":4230,"children":4231},{"class":246,"line":295},[4232,4237,4241,4246,4251,4256,4261,4266,4271,4275,4280,4284,4289,4294,4298],{"type":179,"tag":244,"props":4233,"children":4234},{"style":261},[4235],{"type":184,"value":4236},"  if",{"type":179,"tag":244,"props":4238,"children":4239},{"style":320},[4240],{"type":184,"value":1830},{"type":179,"tag":244,"props":4242,"children":4243},{"style":304},[4244],{"type":184,"value":4245},"authHeader",{"type":179,"tag":244,"props":4247,"children":4248},{"style":284},[4249],{"type":184,"value":4250}," !==",{"type":179,"tag":244,"props":4252,"children":4253},{"style":284},[4254],{"type":184,"value":4255}," `",{"type":179,"tag":244,"props":4257,"children":4258},{"style":346},[4259],{"type":184,"value":4260},"Bearer ",{"type":179,"tag":244,"props":4262,"children":4263},{"style":284},[4264],{"type":184,"value":4265},"${",{"type":179,"tag":244,"props":4267,"children":4268},{"style":304},[4269],{"type":184,"value":4270},"process",{"type":179,"tag":244,"props":4272,"children":4273},{"style":284},[4274],{"type":184,"value":312},{"type":179,"tag":244,"props":4276,"children":4277},{"style":304},[4278],{"type":184,"value":4279},"env",{"type":179,"tag":244,"props":4281,"children":4282},{"style":284},[4283],{"type":184,"value":312},{"type":179,"tag":244,"props":4285,"children":4286},{"style":304},[4287],{"type":184,"value":4288},"CRON_SECRET",{"type":179,"tag":244,"props":4290,"children":4291},{"style":284},[4292],{"type":184,"value":4293},"}`",{"type":179,"tag":244,"props":4295,"children":4296},{"style":320},[4297],{"type":184,"value":1854},{"type":179,"tag":244,"props":4299,"children":4300},{"style":284},[4301],{"type":184,"value":1787},{"type":179,"tag":244,"props":4303,"children":4304},{"class":246,"line":367},[4305,4310,4314,4318,4322,4326,4331,4335,4339,4343,4348,4352,4357,4361],{"type":179,"tag":244,"props":4306,"children":4307},{"style":261},[4308],{"type":184,"value":4309},"    return",{"type":179,"tag":244,"props":4311,"children":4312},{"style":284},[4313],{"type":184,"value":501},{"type":179,"tag":244,"props":4315,"children":4316},{"style":278},[4317],{"type":184,"value":307},{"type":179,"tag":244,"props":4319,"children":4320},{"style":320},[4321],{"type":184,"value":323},{"type":179,"tag":244,"props":4323,"children":4324},{"style":284},[4325],{"type":184,"value":354},{"type":179,"tag":244,"props":4327,"children":4328},{"style":346},[4329],{"type":184,"value":4330},"Unauthorized",{"type":179,"tag":244,"props":4332,"children":4333},{"style":284},[4334],{"type":184,"value":354},{"type":179,"tag":244,"props":4336,"children":4337},{"style":284},[4338],{"type":184,"value":1955},{"type":179,"tag":244,"props":4340,"children":4341},{"style":284},[4342],{"type":184,"value":1003},{"type":179,"tag":244,"props":4344,"children":4345},{"style":320},[4346],{"type":184,"value":4347}," status",{"type":179,"tag":244,"props":4349,"children":4350},{"style":284},[4351],{"type":184,"value":338},{"type":179,"tag":244,"props":4353,"children":4354},{"style":1958},[4355],{"type":184,"value":4356}," 401",{"type":179,"tag":244,"props":4358,"children":4359},{"style":284},[4360],{"type":184,"value":359},{"type":179,"tag":244,"props":4362,"children":4363},{"style":320},[4364],{"type":184,"value":364},{"type":179,"tag":244,"props":4366,"children":4367},{"class":246,"line":491},[4368],{"type":179,"tag":244,"props":4369,"children":4370},{"style":284},[4371],{"type":184,"value":4372},"  }\n",{"type":179,"tag":244,"props":4374,"children":4375},{"class":246,"line":80},[4376],{"type":179,"tag":244,"props":4377,"children":4378},{"style":251},[4379],{"type":184,"value":4380},"  \u002F\u002F Do scheduled work\n",{"type":179,"tag":244,"props":4382,"children":4383},{"class":246,"line":1137},[4384,4388,4392,4396,4400,4404,4408,4412,4416,4420,4424],{"type":179,"tag":244,"props":4385,"children":4386},{"style":261},[4387],{"type":184,"value":301},{"type":179,"tag":244,"props":4389,"children":4390},{"style":304},[4391],{"type":184,"value":307},{"type":179,"tag":244,"props":4393,"children":4394},{"style":284},[4395],{"type":184,"value":312},{"type":179,"tag":244,"props":4397,"children":4398},{"style":278},[4399],{"type":184,"value":317},{"type":179,"tag":244,"props":4401,"children":4402},{"style":320},[4403],{"type":184,"value":323},{"type":179,"tag":244,"props":4405,"children":4406},{"style":284},[4407],{"type":184,"value":328},{"type":179,"tag":244,"props":4409,"children":4410},{"style":320},[4411],{"type":184,"value":1596},{"type":179,"tag":244,"props":4413,"children":4414},{"style":284},[4415],{"type":184,"value":338},{"type":179,"tag":244,"props":4417,"children":4418},{"style":1191},[4419],{"type":184,"value":1194},{"type":179,"tag":244,"props":4421,"children":4422},{"style":284},[4423],{"type":184,"value":359},{"type":179,"tag":244,"props":4425,"children":4426},{"style":320},[4427],{"type":184,"value":364},{"type":179,"tag":244,"props":4429,"children":4430},{"class":246,"line":40},[4431],{"type":179,"tag":244,"props":4432,"children":4433},{"style":284},[4434],{"type":184,"value":373},{"type":179,"tag":193,"props":4436,"children":4438},{"id":4437},"configuration-via-verceljson",[4439],{"type":184,"value":4440},"Configuration via vercel.json",{"type":179,"tag":187,"props":4442,"children":4443},{},[4444,4449,4451,4457,4459,4464,4466,4471,4472,4477],{"type":179,"tag":809,"props":4445,"children":4446},{},[4447],{"type":184,"value":4448},"Deprecation notice",{"type":184,"value":4450},": Support for the legacy ",{"type":179,"tag":240,"props":4452,"children":4454},{"className":4453},[],[4455],{"type":184,"value":4456},"now.json",{"type":184,"value":4458}," config file will be removed on ",{"type":179,"tag":809,"props":4460,"children":4461},{},[4462],{"type":184,"value":4463},"March 31, 2026",{"type":184,"value":4465},". Rename ",{"type":179,"tag":240,"props":4467,"children":4469},{"className":4468},[],[4470],{"type":184,"value":4456},{"type":184,"value":552},{"type":179,"tag":240,"props":4473,"children":4475},{"className":4474},[],[4476],{"type":184,"value":56},{"type":184,"value":4478}," (no content changes required).",{"type":179,"tag":232,"props":4480,"children":4482},{"className":3889,"code":4481,"language":317,"meta":237,"style":237},"{\n  \"functions\": {\n    \"app\u002Fapi\u002Fheavy\u002F**\": {\n      \"maxDuration\": 300,\n      \"memory\": 1024\n    },\n    \"app\u002Fapi\u002Fedge\u002F**\": {\n      \"runtime\": \"edge\"\n    }\n  }\n}\n",[4483],{"type":179,"tag":240,"props":4484,"children":4485},{"__ignoreMap":237},[4486,4493,4517,4542,4571,4596,4603,4627,4659,4666,4673],{"type":179,"tag":244,"props":4487,"children":4488},{"class":246,"line":247},[4489],{"type":179,"tag":244,"props":4490,"children":4491},{"style":284},[4492],{"type":184,"value":1787},{"type":179,"tag":244,"props":4494,"children":4495},{"class":246,"line":257},[4496,4500,4505,4509,4513],{"type":179,"tag":244,"props":4497,"children":4498},{"style":284},[4499],{"type":184,"value":3909},{"type":179,"tag":244,"props":4501,"children":4502},{"style":267},[4503],{"type":184,"value":4504},"functions",{"type":179,"tag":244,"props":4506,"children":4507},{"style":284},[4508],{"type":184,"value":3919},{"type":179,"tag":244,"props":4510,"children":4511},{"style":284},[4512],{"type":184,"value":338},{"type":179,"tag":244,"props":4514,"children":4515},{"style":284},[4516],{"type":184,"value":292},{"type":179,"tag":244,"props":4518,"children":4519},{"class":246,"line":295},[4520,4525,4530,4534,4538],{"type":179,"tag":244,"props":4521,"children":4522},{"style":284},[4523],{"type":184,"value":4524},"    \"",{"type":179,"tag":244,"props":4526,"children":4527},{"style":1074},[4528],{"type":184,"value":4529},"app\u002Fapi\u002Fheavy\u002F**",{"type":179,"tag":244,"props":4531,"children":4532},{"style":284},[4533],{"type":184,"value":3919},{"type":179,"tag":244,"props":4535,"children":4536},{"style":284},[4537],{"type":184,"value":338},{"type":179,"tag":244,"props":4539,"children":4540},{"style":284},[4541],{"type":184,"value":292},{"type":179,"tag":244,"props":4543,"children":4544},{"class":246,"line":367},[4545,4549,4554,4558,4562,4567],{"type":179,"tag":244,"props":4546,"children":4547},{"style":284},[4548],{"type":184,"value":3944},{"type":179,"tag":244,"props":4550,"children":4551},{"style":1958},[4552],{"type":184,"value":4553},"maxDuration",{"type":179,"tag":244,"props":4555,"children":4556},{"style":284},[4557],{"type":184,"value":3919},{"type":179,"tag":244,"props":4559,"children":4560},{"style":284},[4561],{"type":184,"value":338},{"type":179,"tag":244,"props":4563,"children":4564},{"style":1958},[4565],{"type":184,"value":4566}," 300",{"type":179,"tag":244,"props":4568,"children":4569},{"style":284},[4570],{"type":184,"value":3049},{"type":179,"tag":244,"props":4572,"children":4573},{"class":246,"line":491},[4574,4578,4583,4587,4591],{"type":179,"tag":244,"props":4575,"children":4576},{"style":284},[4577],{"type":184,"value":3944},{"type":179,"tag":244,"props":4579,"children":4580},{"style":1958},[4581],{"type":184,"value":4582},"memory",{"type":179,"tag":244,"props":4584,"children":4585},{"style":284},[4586],{"type":184,"value":3919},{"type":179,"tag":244,"props":4588,"children":4589},{"style":284},[4590],{"type":184,"value":338},{"type":179,"tag":244,"props":4592,"children":4593},{"style":1958},[4594],{"type":184,"value":4595}," 1024\n",{"type":179,"tag":244,"props":4597,"children":4598},{"class":246,"line":80},[4599],{"type":179,"tag":244,"props":4600,"children":4601},{"style":284},[4602],{"type":184,"value":2002},{"type":179,"tag":244,"props":4604,"children":4605},{"class":246,"line":1137},[4606,4610,4615,4619,4623],{"type":179,"tag":244,"props":4607,"children":4608},{"style":284},[4609],{"type":184,"value":4524},{"type":179,"tag":244,"props":4611,"children":4612},{"style":1074},[4613],{"type":184,"value":4614},"app\u002Fapi\u002Fedge\u002F**",{"type":179,"tag":244,"props":4616,"children":4617},{"style":284},[4618],{"type":184,"value":3919},{"type":179,"tag":244,"props":4620,"children":4621},{"style":284},[4622],{"type":184,"value":338},{"type":179,"tag":244,"props":4624,"children":4625},{"style":284},[4626],{"type":184,"value":292},{"type":179,"tag":244,"props":4628,"children":4629},{"class":246,"line":40},[4630,4634,4639,4643,4647,4651,4655],{"type":179,"tag":244,"props":4631,"children":4632},{"style":284},[4633],{"type":184,"value":3944},{"type":179,"tag":244,"props":4635,"children":4636},{"style":1958},[4637],{"type":184,"value":4638},"runtime",{"type":179,"tag":244,"props":4640,"children":4641},{"style":284},[4642],{"type":184,"value":3919},{"type":179,"tag":244,"props":4644,"children":4645},{"style":284},[4646],{"type":184,"value":338},{"type":179,"tag":244,"props":4648,"children":4649},{"style":284},[4650],{"type":184,"value":3962},{"type":179,"tag":244,"props":4652,"children":4653},{"style":346},[4654],{"type":184,"value":447},{"type":179,"tag":244,"props":4656,"children":4657},{"style":284},[4658],{"type":184,"value":4009},{"type":179,"tag":244,"props":4660,"children":4661},{"class":246,"line":1205},[4662],{"type":179,"tag":244,"props":4663,"children":4664},{"style":284},[4665],{"type":184,"value":4099},{"type":179,"tag":244,"props":4667,"children":4668},{"class":246,"line":1213},[4669],{"type":179,"tag":244,"props":4670,"children":4671},{"style":284},[4672],{"type":184,"value":4372},{"type":179,"tag":244,"props":4674,"children":4675},{"class":246,"line":1222},[4676],{"type":179,"tag":244,"props":4677,"children":4678},{"style":284},[4679],{"type":184,"value":373},{"type":179,"tag":193,"props":4681,"children":4683},{"id":4682},"timeout-limits",[4684],{"type":184,"value":4685},"Timeout Limits",{"type":179,"tag":187,"props":4687,"children":4688},{},[4689],{"type":184,"value":4690},"All plans now default to 300s execution time with Fluid Compute.",{"type":179,"tag":605,"props":4692,"children":4693},{},[4694,4715],{"type":179,"tag":609,"props":4695,"children":4696},{},[4697],{"type":179,"tag":613,"props":4698,"children":4699},{},[4700,4705,4710],{"type":179,"tag":617,"props":4701,"children":4702},{},[4703],{"type":184,"value":4704},"Plan",{"type":179,"tag":617,"props":4706,"children":4707},{},[4708],{"type":184,"value":4709},"Default",{"type":179,"tag":617,"props":4711,"children":4712},{},[4713],{"type":184,"value":4714},"Max",{"type":179,"tag":633,"props":4716,"children":4717},{},[4718,4735,4752],{"type":179,"tag":613,"props":4719,"children":4720},{},[4721,4726,4731],{"type":179,"tag":640,"props":4722,"children":4723},{},[4724],{"type":184,"value":4725},"Hobby",{"type":179,"tag":640,"props":4727,"children":4728},{},[4729],{"type":184,"value":4730},"300s",{"type":179,"tag":640,"props":4732,"children":4733},{},[4734],{"type":184,"value":4730},{"type":179,"tag":613,"props":4736,"children":4737},{},[4738,4743,4747],{"type":179,"tag":640,"props":4739,"children":4740},{},[4741],{"type":184,"value":4742},"Pro",{"type":179,"tag":640,"props":4744,"children":4745},{},[4746],{"type":184,"value":4730},{"type":179,"tag":640,"props":4748,"children":4749},{},[4750],{"type":184,"value":4751},"800s",{"type":179,"tag":613,"props":4753,"children":4754},{},[4755,4760,4764],{"type":179,"tag":640,"props":4756,"children":4757},{},[4758],{"type":184,"value":4759},"Enterprise",{"type":179,"tag":640,"props":4761,"children":4762},{},[4763],{"type":184,"value":4730},{"type":179,"tag":640,"props":4765,"children":4766},{},[4767],{"type":184,"value":4751},{"type":179,"tag":193,"props":4769,"children":4771},{"id":4770},"common-pitfalls",[4772],{"type":184,"value":4773},"Common Pitfalls",{"type":179,"tag":4775,"props":4776,"children":4777},"ol",{},[4778,4795,4821,4831,4841],{"type":179,"tag":211,"props":4779,"children":4780},{},[4781,4786,4788,4794],{"type":179,"tag":809,"props":4782,"children":4783},{},[4784],{"type":184,"value":4785},"Cold starts with DB connections",{"type":184,"value":4787},": Use connection pooling (e.g., Neon's ",{"type":179,"tag":240,"props":4789,"children":4791},{"className":4790},[],[4792],{"type":184,"value":4793},"@neondatabase\u002Fserverless",{"type":184,"value":1082},{"type":179,"tag":211,"props":4796,"children":4797},{},[4798,4803,4805,4811,4813,4819],{"type":179,"tag":809,"props":4799,"children":4800},{},[4801],{"type":184,"value":4802},"Edge limitations",{"type":184,"value":4804},": No ",{"type":179,"tag":240,"props":4806,"children":4808},{"className":4807},[],[4809],{"type":184,"value":4810},"fs",{"type":184,"value":4812},", no native modules, limited ",{"type":179,"tag":240,"props":4814,"children":4816},{"className":4815},[],[4817],{"type":184,"value":4818},"crypto",{"type":184,"value":4820}," — use Node.js runtime if needed",{"type":179,"tag":211,"props":4822,"children":4823},{},[4824,4829],{"type":179,"tag":809,"props":4825,"children":4826},{},[4827],{"type":184,"value":4828},"Timeout exceeded",{"type":184,"value":4830},": Use Fluid Compute for long-running tasks, or Workflow DevKit for very long processes",{"type":179,"tag":211,"props":4832,"children":4833},{},[4834,4839],{"type":179,"tag":809,"props":4835,"children":4836},{},[4837],{"type":184,"value":4838},"Bundle size",{"type":184,"value":4840},": Functions support up to 5 GB package size on Fluid Compute (up from 250 MB); request bodies up to 100 MB (up from 4.5 MB)",{"type":179,"tag":211,"props":4842,"children":4843},{},[4844,4849,4851,4857],{"type":179,"tag":809,"props":4845,"children":4846},{},[4847],{"type":184,"value":4848},"Environment variables",{"type":184,"value":4850},": Available in all functions automatically; use ",{"type":179,"tag":240,"props":4852,"children":4854},{"className":4853},[],[4855],{"type":184,"value":4856},"vercel env pull",{"type":184,"value":4858}," for local dev",{"type":179,"tag":193,"props":4860,"children":4862},{"id":4861},"function-runtime-diagnostics",[4863],{"type":184,"value":4864},"Function Runtime Diagnostics",{"type":179,"tag":200,"props":4866,"children":4868},{"id":4867},"timeout-diagnostics",[4869],{"type":184,"value":4870},"Timeout Diagnostics",{"type":179,"tag":232,"props":4872,"children":4876},{"className":4873,"code":4875,"language":184},[4874],"language-text","504 Gateway Timeout?\n├─ All plans default to 300s with Fluid Compute\n├─ Pro\u002FEnterprise: configurable up to 800s\n├─ Long-running task?\n│  ├─ Under 5 min → Use Fluid Compute with streaming\n│  ├─ Up to 15 min → Use Vercel Functions with `maxDuration` in vercel.json\n│  └─ Hours\u002Fdays → Use Workflow DevKit (DurableAgent or workflow steps)\n└─ DB query slow? → Add connection pooling, check cold start, use Edge Config\n",[4877],{"type":179,"tag":240,"props":4878,"children":4879},{"__ignoreMap":237},[4880],{"type":184,"value":4875},{"type":179,"tag":200,"props":4882,"children":4884},{"id":4883},"_500-error-diagnostics",[4885],{"type":184,"value":4886},"500 Error Diagnostics",{"type":179,"tag":232,"props":4888,"children":4891},{"className":4889,"code":4890,"language":184},[4874],"500 Internal Server Error?\n├─ Check Vercel Runtime Logs (Dashboard → Deployments → Functions tab)\n├─ Missing env vars? → Compare `.env.local` against Vercel dashboard settings\n├─ Import error? → Verify package is in `dependencies`, not `devDependencies`\n└─ Uncaught exception? → Wrap handler in try\u002Fcatch, use `after()` for error reporting\n",[4892],{"type":179,"tag":240,"props":4893,"children":4894},{"__ignoreMap":237},[4895],{"type":184,"value":4890},{"type":179,"tag":200,"props":4897,"children":4899},{"id":4898},"invocation-failure-diagnostics",[4900],{"type":184,"value":4901},"Invocation Failure Diagnostics",{"type":179,"tag":232,"props":4903,"children":4906},{"className":4904,"code":4905,"language":184},[4874],"\"FUNCTION_INVOCATION_FAILED\"?\n├─ Memory exceeded? → Increase `memory` in vercel.json (up to 3008 MB on Pro)\n├─ Crashed during init? → Check top-level await or heavy imports at module scope\n└─ Edge Function crash? → Check for Node.js APIs not available in Edge runtime\n",[4907],{"type":179,"tag":240,"props":4908,"children":4909},{"__ignoreMap":237},[4910],{"type":184,"value":4905},{"type":179,"tag":200,"props":4912,"children":4914},{"id":4913},"cold-start-diagnostics",[4915],{"type":184,"value":4916},"Cold Start Diagnostics",{"type":179,"tag":232,"props":4918,"children":4921},{"className":4919,"code":4920,"language":184},[4874],"Cold start latency > 1s?\n├─ Using Node.js runtime? → Consider Edge Functions for latency-sensitive routes\n├─ Large function bundle? → Audit imports, use dynamic imports, tree-shake\n├─ DB connection in cold start? → Use connection pooling (Neon serverless driver)\n└─ Enable Fluid Compute to reuse warm instances across requests\n",[4922],{"type":179,"tag":240,"props":4923,"children":4924},{"__ignoreMap":237},[4925],{"type":184,"value":4920},{"type":179,"tag":200,"props":4927,"children":4929},{"id":4928},"edge-function-timeout-diagnostics",[4930],{"type":184,"value":4931},"Edge Function Timeout Diagnostics",{"type":179,"tag":232,"props":4933,"children":4936},{"className":4934,"code":4935,"language":184},[4874],"\"EDGE_FUNCTION_INVOCATION_TIMEOUT\"?\n├─ Edge Functions have 25s hard limit (not configurable)\n├─ Move heavy computation to Node.js Serverless Functions\n└─ Use streaming to start response early, process in background with `waitUntil`\n",[4937],{"type":179,"tag":240,"props":4938,"children":4939},{"__ignoreMap":237},[4940],{"type":184,"value":4935},{"type":179,"tag":193,"props":4942,"children":4944},{"id":4943},"official-documentation",[4945],{"type":184,"value":4946},"Official Documentation",{"type":179,"tag":207,"props":4948,"children":4949},{},[4950,4958,4966,4974,4983,4992,5000,5009],{"type":179,"tag":211,"props":4951,"children":4952},{},[4953],{"type":179,"tag":3409,"props":4954,"children":4956},{"href":42,"rel":4955},[3413],[4957],{"type":184,"value":185},{"type":179,"tag":211,"props":4959,"children":4960},{},[4961],{"type":179,"tag":3409,"props":4962,"children":4964},{"href":42,"rel":4963},[3413],[4965],{"type":184,"value":143},{"type":179,"tag":211,"props":4967,"children":4968},{},[4969],{"type":179,"tag":3409,"props":4970,"children":4972},{"href":42,"rel":4971},[3413],[4973],{"type":184,"value":24},{"type":179,"tag":211,"props":4975,"children":4976},{},[4977],{"type":179,"tag":3409,"props":4978,"children":4981},{"href":4979,"rel":4980},"https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffluid-compute",[3413],[4982],{"type":184,"value":144},{"type":179,"tag":211,"props":4984,"children":4985},{},[4986],{"type":179,"tag":3409,"props":4987,"children":4990},{"href":4988,"rel":4989},"https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fstreaming",[3413],[4991],{"type":184,"value":1624},{"type":179,"tag":211,"props":4993,"children":4994},{},[4995],{"type":179,"tag":3409,"props":4996,"children":4998},{"href":44,"rel":4997},[3413],[4999],{"type":184,"value":146},{"type":179,"tag":211,"props":5001,"children":5002},{},[5003],{"type":179,"tag":3409,"props":5004,"children":5007},{"href":5005,"rel":5006},"https:\u002F\u002Fvercel.com\u002Fdocs\u002Fcron-jobs",[3413],[5008],{"type":184,"value":147},{"type":179,"tag":211,"props":5010,"children":5011},{},[5012],{"type":179,"tag":3409,"props":5013,"children":5016},{"href":5014,"rel":5015},"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fvercel",[3413],[5017],{"type":184,"value":5018},"GitHub: Vercel",{"type":179,"tag":5020,"props":5021,"children":5022},"style",{},[5023],{"type":184,"value":5024},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5026,"total":5201},[5027,5048,5060,5079,5090,5105,5120,5138,5150,5169,5181,5191],{"slug":5028,"name":5028,"fn":5029,"description":5030,"org":5031,"tags":5032,"stars":5045,"repoUrl":5046,"updatedAt":5047},"next-cache-components-adoption","enable and migrate to Next.js Cache Components","Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the `cacheComponents` flag, work through a flood of blocking-prerender \u002F instant validation errors, run the `cache-components-instant-false` codemod, or decide between opting routes out with `export const instant = false` and fixing them in place.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5033,5036,5039,5042,5044],{"name":5034,"slug":5035,"type":15},"Caching","caching",{"name":5037,"slug":5038,"type":15},"Frontend","frontend",{"name":5040,"slug":5041,"type":15},"Migration","migration",{"name":3122,"slug":5043,"type":15},"next-js",{"name":9,"slug":8,"type":15},141208,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fnext.js","2026-07-24T05:38:30.118542",{"slug":5049,"name":5049,"fn":5050,"description":5051,"org":5052,"tags":5053,"stars":5045,"repoUrl":5046,"updatedAt":5059},"next-cache-components-optimizer","optimize Next.js cache components","Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components \u002F PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next\u002Fplaywright instant() e2e and work it to green, one verified route at a time; the shipped test then guards against regression. Use when asked to make a route's navigation instant (its static shell commits immediately), fix a route whose static shell isn't prerendered\u002Fserved\u002Fprefetched, grow a route's static shell or fix its slow first paint, diagnose which Suspense boundary keeps a route out of its static shell, or write the instant() e2e guard for one. Requires Next.js 16.3+ with cacheComponents; directs an upgrade if older.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5054,5055,5056,5057,5058],{"name":5034,"slug":5035,"type":15},{"name":5037,"slug":5038,"type":15},{"name":3122,"slug":5043,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:31:10.674078",{"slug":5061,"name":5061,"fn":5062,"description":5063,"org":5064,"tags":5065,"stars":5045,"repoUrl":5046,"updatedAt":5078},"next-dev-loop","verify Next.js runtime behavior","Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines \u002F_next\u002Fmcp (Next.js's view) with agent-browser (the browser's view). Requires a running `next dev`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5066,5069,5070,5073,5074,5075],{"name":5067,"slug":5068,"type":15},"Debugging","debugging",{"name":5037,"slug":5038,"type":15},{"name":5071,"slug":5072,"type":15},"Local Development","local-development",{"name":3122,"slug":5043,"type":15},{"name":9,"slug":8,"type":15},{"name":5076,"slug":5077,"type":15},"Web Development","web-development","2026-05-22T06:45:28.627735",{"slug":5080,"name":5080,"fn":5081,"description":5082,"org":5083,"tags":5084,"stars":5045,"repoUrl":5046,"updatedAt":5089},"next-partial-prefetching-adoption","adopt Partial Prefetching in Next.js apps","Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the `partialPrefetching` flag, opt routes in with `export const prefetch = 'partial'`, audit `\u003CLink prefetch={true}>` calls, or resolve the link-prefetch-partial and instant-shell-url-data insights.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5085,5086,5087,5088],{"name":5037,"slug":5038,"type":15},{"name":3122,"slug":5043,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:31:11.591864",{"slug":5091,"name":5091,"fn":5092,"description":5093,"org":5094,"tags":5095,"stars":5102,"repoUrl":5103,"updatedAt":5104},"turborepo","manage monorepos with Turborepo","Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines,\ndependsOn, caching, remote cache, the \"turbo\" CLI, --filter, --affected, CI optimization, environment\nvariables, internal packages, monorepo structure\u002Fbest practices, and boundaries.\n\nUse when user: configures tasks\u002Fworkflows\u002Fpipelines, creates packages, sets up\nmonorepo, shares code between apps, runs changed\u002Faffected packages, debugs cache,\nor has apps\u002Fpackages directories.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5096,5099,5100],{"name":5097,"slug":5098,"type":15},"CI\u002FCD","ci-cd",{"name":13,"slug":14,"type":15},{"name":5101,"slug":5091,"type":15},"Turborepo",30809,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fturborepo","2026-07-30T05:32:14.920116",{"slug":5106,"name":5106,"fn":5107,"description":5108,"org":5109,"tags":5110,"stars":5117,"repoUrl":5118,"updatedAt":5119},"add-function-examples","add AI function examples for testing","Guide for adding new AI function examples, for testing specific features against the actual provider APIs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5111,5113,5116],{"name":5112,"slug":94,"type":15},"AI SDK",{"name":5114,"slug":5115,"type":15},"Testing","testing",{"name":9,"slug":8,"type":15},25670,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai","2026-04-06T18:55:51.318866",{"slug":5121,"name":5121,"fn":5122,"description":5123,"org":5124,"tags":5125,"stars":5117,"repoUrl":5118,"updatedAt":5137},"add-harness-package","add AI SDK harness packages","Guide for adding new AI SDK harness packages. Use when creating a new @ai-sdk\u002Fharness-\u003Cname> package that adapts a coding-agent runtime to HarnessV1.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5126,5129,5130,5133,5136],{"name":5127,"slug":5128,"type":15},"Agents","agents",{"name":5112,"slug":94,"type":15},{"name":5131,"slug":5132,"type":15},"Harness","harness",{"name":5134,"slug":5135,"type":15},"SDK","sdk",{"name":9,"slug":8,"type":15},"2026-06-18T08:29:19.858737",{"slug":5139,"name":5139,"fn":5140,"description":5141,"org":5142,"tags":5143,"stars":5117,"repoUrl":5118,"updatedAt":5149},"add-provider-package","add new provider packages to AI SDK","Guide for adding new AI provider packages to the AI SDK. Use when creating a new @ai-sdk\u002F\u003Cprovider> package to integrate an AI service into the SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5144,5145,5148],{"name":5112,"slug":94,"type":15},{"name":5146,"slug":5147,"type":15},"API Development","api-development",{"name":9,"slug":8,"type":15},"2026-04-06T18:55:47.45549",{"slug":5151,"name":5151,"fn":5152,"description":5153,"org":5154,"tags":5155,"stars":5117,"repoUrl":5118,"updatedAt":5168},"adr-skill","create and maintain architecture decision records","Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept\u002Freject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses Socratic questioning to capture intent before drafting, and validates output against an agent-readiness checklist.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5156,5159,5162,5165],{"name":5157,"slug":5158,"type":15},"ADR","adr",{"name":5160,"slug":5161,"type":15},"Architecture","architecture",{"name":5163,"slug":5164,"type":15},"Documentation","documentation",{"name":5166,"slug":5167,"type":15},"Engineering","engineering","2026-04-06T18:55:50.043694",{"slug":94,"name":94,"fn":5170,"description":5171,"org":5172,"tags":5173,"stars":5117,"repoUrl":5118,"updatedAt":5180},"build AI features with Vercel AI SDK","Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: \"AI SDK\", \"Vercel AI SDK\", \"generateText\", \"streamText\", \"add AI to my app\", \"build an agent\", \"tool calling\", \"structured output\", \"useChat\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5174,5175,5176,5179],{"name":5127,"slug":5128,"type":15},{"name":5112,"slug":94,"type":15},{"name":5177,"slug":5178,"type":15},"LLM","llm",{"name":9,"slug":8,"type":15},"2026-04-06T18:55:48.739463",{"slug":5182,"name":5182,"fn":5183,"description":5184,"org":5185,"tags":5186,"stars":5117,"repoUrl":5118,"updatedAt":5190},"capture-api-response-test-fixture","capture API response test fixtures","Capture API response test fixture.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5187,5188,5189],{"name":5146,"slug":5147,"type":15},{"name":5114,"slug":5115,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:55:56.374433",{"slug":5192,"name":5192,"fn":5193,"description":5194,"org":5195,"tags":5196,"stars":5117,"repoUrl":5118,"updatedAt":5200},"develop-ai-functions-example","develop AI SDK function examples","Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples\u002Fai-functions\u002Fsrc to validate provider support, demonstrate features, or create test fixtures.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5197,5198,5199],{"name":5112,"slug":94,"type":15},{"name":5114,"slug":5115,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:55:55.088956",68,{"items":5203,"total":5302},[5204,5219,5237,5252,5265,5278,5291],{"slug":5205,"name":5205,"fn":5206,"description":5207,"org":5208,"tags":5209,"stars":26,"repoUrl":27,"updatedAt":5218},"ai-gateway","configure and manage Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5210,5213,5216,5217],{"name":5211,"slug":5212,"type":15},"AI Infrastructure","ai-infrastructure",{"name":5214,"slug":5215,"type":15},"Cost Optimization","cost-optimization",{"name":5177,"slug":5178,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:56:06.57787",{"slug":5220,"name":5220,"fn":5221,"description":5222,"org":5223,"tags":5224,"stars":26,"repoUrl":27,"updatedAt":5236},"auth","integrate authentication in Next.js apps","Authentication integration guidance — Clerk (native Vercel Marketplace), Descope, and Auth0 setup for Next.js applications. Covers middleware auth patterns, sign-in\u002Fsign-up flows, and Marketplace provisioning. Use when implementing user authentication.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5225,5228,5231,5232,5235],{"name":5226,"slug":5227,"type":15},"Auth0","auth0",{"name":5229,"slug":5230,"type":15},"Authentication","authentication",{"name":3122,"slug":5043,"type":15},{"name":5233,"slug":5234,"type":15},"Security","security",{"name":9,"slug":8,"type":15},"2026-04-06T18:56:17.050565",{"slug":5238,"name":5238,"fn":5239,"description":5240,"org":5241,"tags":5242,"stars":26,"repoUrl":27,"updatedAt":5251},"bootstrap","bootstrap Vercel-linked repositories","Project bootstrapping orchestrator for repos that depend on Vercel-linked resources (databases, auth, and managed integrations). Use when setting up or repairing a repository so linking, environment provisioning, env pulls, and first-run db\u002Fdev commands happen in the correct safe order.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5243,5246,5249,5250],{"name":5244,"slug":5245,"type":15},"Configuration","configuration",{"name":5247,"slug":5248,"type":15},"Deployment","deployment",{"name":5071,"slug":5072,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:56:18.297868",{"slug":5253,"name":5253,"fn":5254,"description":5255,"org":5256,"tags":5257,"stars":26,"repoUrl":27,"updatedAt":5264},"cdn-caching","debug Vercel CDN caching behavior","Debug Vercel CDN caching — cache hit rate, stale content, revalidation behavior, ISR + PPR, per-request cache reasons (cacheReason) and PPR state (ppr_state), and costs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5258,5259,5262,5263],{"name":5034,"slug":5035,"type":15},{"name":5260,"slug":5261,"type":15},"Observability","observability",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:31:34.628944",{"slug":5266,"name":5266,"fn":5267,"description":5268,"org":5269,"tags":5270,"stars":26,"repoUrl":27,"updatedAt":5277},"chat-sdk","build multi-platform chatbots with Vercel","Vercel Chat SDK expert guidance. Use when building multi-platform chat bots — Slack, Telegram, Microsoft Teams, Discord, Google Chat, GitHub, Linear — with a single codebase. Covers the Chat class, adapters, threads, messages, cards, modals, streaming, state management, and webhook setup.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5271,5272,5275,5276],{"name":5127,"slug":5128,"type":15},{"name":5273,"slug":5274,"type":15},"Messaging","messaging",{"name":5134,"slug":5135,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:56:26.921901",{"slug":5279,"name":5279,"fn":5280,"description":5281,"org":5282,"tags":5283,"stars":26,"repoUrl":27,"updatedAt":5290},"deployments-cicd","manage Vercel deployments and CI\u002FCD","Vercel deployment and CI\u002FCD expert guidance. Use when deploying, promoting, rolling back, inspecting deployments, building with --prebuilt, or configuring CI workflow files for Vercel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5284,5285,5286,5289],{"name":5097,"slug":5098,"type":15},{"name":5247,"slug":5248,"type":15},{"name":5287,"slug":5288,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-04-06T18:56:22.054263",{"slug":5292,"name":5292,"fn":5293,"description":5294,"org":5295,"tags":5296,"stars":26,"repoUrl":27,"updatedAt":5301},"env-vars","manage Vercel environment variables","Vercel environment variable expert guidance. Use when working with .env files, vercel env commands, OIDC tokens, or managing environment-specific configuration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5297,5298,5299,5300],{"name":5244,"slug":5245,"type":15},{"name":5287,"slug":5288,"type":15},{"name":5233,"slug":5234,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:56:28.150777",29]