Deployment Presets

Deploy Taser APIs across Cloudflare Workers, Vercel, AWS Lambda, Node.js, Bun, Deno, and Netlify using multi-cloud Nitro server presets.

Taser leverages Nitro's battle-tested preset system to generate optimized production builds tailored for any cloud platform or runtime with zero code changes.


Configuring Presets

You can declare your target preset in nitro.config.ts:

nitro.config.ts
import { defineConfig } from "nitro/config";

export default defineConfig({
  preset: "node-server", // Change to your deployment target
});

Or override dynamically at build time using the NITRO_PRESET environment variable:

NITRO_PRESET=cloudflare-module pnpm build

Supported Presets

PresetTarget Platform / RuntimeOutput DirectoryCommand / Start
node-serverStandard Node.js Server (Docker, Railway, Render, Fly.io, VPS).output/server/index.mjsnode .output/server/index.mjs
node-clusterMulti-core Node.js Cluster with worker process management.output/server/index.mjsnode .output/server/index.mjs
bunBun high-performance JavaScript runtime.output/server/index.mjsbun .output/server/index.mjs
deno-serverStandalone Deno server.output/server/index.mjsdeno run -A .output/server/index.mjs
deno-deployDeno Deploy global edge network.output/server/index.mjsNative Deno Deploy GitHub Action
cloudflare-moduleCloudflare Workers & Pages Functions (V8 isolates).output/server/index.mjswrangler deploy
vercelVercel Serverless & Edge infrastructure.output/ (Build Output API v3)vercel deploy
aws-lambdaAWS Lambda with API Gateway or Lambda Function URLs.output/server/index.mjsZip & upload or AWS SAM / Serverless Framework
netlifyNetlify Serverless Functions & Edge.output/Netlify CLI / GitHub Deploy

Platform Guides

1. Node Server (Docker / VPS / PaaS)

For containerized deployments or long-running Node.js instances:

nitro.config.ts
import { defineConfig } from "nitro/config";

export default defineConfig({
  preset: "node-server",
});

Example production Dockerfile:

FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile
COPY . .
RUN pnpm build

FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
COPY --from=builder /app/.output .output
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]

2. Cloudflare Workers

To deploy to Cloudflare's global edge network:

nitro.config.ts
import { defineConfig } from "nitro/config";

export default defineConfig({
  preset: "cloudflare-module",
});

Create wrangler.jsonc or wrangler.toml:

wrangler.jsonc
{
  "name": "my-taser-api",
  "main": "./.output/server/index.mjs",
  "compatibility_date": "2026-08-01"
}

Deploy using Wrangler:

pnpm build
npx wrangler deploy

3. Vercel

To deploy on Vercel:

nitro.config.ts
import { defineConfig } from "nitro/config";

export default defineConfig({
  preset: "vercel",
});

Push your repository to GitHub and import into the Vercel Dashboard. Vercel automatically detects the .output build directory.


4. AWS Lambda

For AWS Lambda deployment:

nitro.config.ts
import { defineConfig } from "nitro/config";

export default defineConfig({
  preset: "aws-lambda",
});

The compiled handler at .output/server/index.mjs exposes the standard AWS Lambda handler function handler(event, context).


Next Steps