ProductionDeployment

Deployment

Deploy a NextRush app to Node.js, Bun, Deno, or an edge runtime, containerize it with Docker, or deploy straight to AWS Lambda, Google Cloud Functions, or Azure Functions.

NextRush ships one adapter per runtime — @nextrush/adapter-node, @nextrush/adapter-bun, @nextrush/adapter-deno, and @nextrush/adapter-edge. Your application code (routes, middleware, context usage) stays the same across all four; only the adapter import and the serve/listen call change. The pages below are organized by two different questions: which runtime your app runs on (Node/Bun/Deno/Edge), and which platform you're shipping to (AWS Lambda, Google Cloud Functions, and Azure Functions each have their own page; Vercel, Netlify, and Cloudflare are covered under Edge instead, since a runtime and a platform aren't the same axis — see Event mapping for why the serverless platforms need their own translation layer that edge platforms don't).

Pick a runtime

The default, most-deployed target. Runs anywhere Node.js runs — VMs, containers, PaaS. See Node.js deployment.

Drop-in replacement for Node.js with a faster cold start and native TypeScript execution. See Bun deployment.

Secure-by-default runtime with explicit permission flags. See Deno deployment.

V8 isolates at the network edge (Cloudflare Workers, Vercel Edge, Netlify Edge). No filesystem, no long-running process. See Edge deployment.

Pick a platform

A platform (the vendor you ship to) is a different question from a runtime — Vercel runs both Node and Edge functions, and AWS Lambda's serverless invocation model isn't a distinct runtime in NextRush's adapter layer at all (createLambdaHandler is built directly on the edge adapter's fetch engine — see Serverless). Platform pages document what's specific to shipping there: CLI, config, IAM/permissions, and event-shape translation where one applies.

Vercel, Netlify, and Cloudflare don't have a separate platform page here — they're already fully covered by the runtime-keyed Edge deployment page (CLI, config, and platform bindings for all three), so a duplicate page under a different name wouldn't add anything new.

The import that changes per runtime

Application code — routes, middleware, ctx usage — is identical across all four runtimes. Only the adapter import and the serve/listen call change, as shown below for a minimal health-check route:

import { createApp, createRouter, listen } from 'nextrush';

const app = createApp();
const router = createRouter();

router.get('/health', (ctx) => ctx.json({ status: 'ok' }));
app.route('/', router);

await listen(app, 8080);
import { createApp } from '@nextrush/core';
import { createRouter } from '@nextrush/router';
import { serve } from '@nextrush/adapter-bun';

const app = createApp();
const router = createRouter();

router.get('/health', (ctx) => ctx.json({ status: 'ok' }));
app.route('/', router);

serve(app, { port: 8080 });
import { createApp } from '@nextrush/core';
import { createRouter } from '@nextrush/router';
import { serve } from '@nextrush/adapter-deno';

const app = createApp();
const router = createRouter();

router.get('/health', (ctx) => ctx.json({ status: 'ok' }));
app.route('/', router);

serve(app, { port: 8080 });
import { createApp } from '@nextrush/core';
import { createRouter } from '@nextrush/router';
import { createCloudflareHandler } from '@nextrush/adapter-edge';

const app = createApp();
const router = createRouter();

router.get('/health', (ctx) => ctx.json({ status: 'ok' }));
app.route('/', router);

export default createCloudflareHandler(app);

Containerize with Docker

If you're deploying to Kubernetes, ECS, Railway, Fly.io, or any container platform, see Docker for a real, tested multi-stage Dockerfile using the Node.js adapter.

Adapter comparison

AdapterPackageServer API wrappedLong-running process?
Node.js@nextrush/adapter-nodehttp.createServerYes
Bun@nextrush/adapter-bunBun.serve()Yes
Deno@nextrush/adapter-denoDeno.serve()Yes
Edge@nextrush/adapter-edgeFetch API (fetch(request))No — request-scoped only

The `nextrush` meta package defaults to Node.js

import { listen } from 'nextrush' re-exports @nextrush/adapter-node. For Bun, Deno, or edge, install the matching adapter package directly and import createApp from @nextrush/core — see each runtime's page for the exact imports.

Was this helpful?

On this page