Skip to Content

HTTP Adapters

Choose the HTTP adapter by the way the service will run. The simple rule: the adapter knows the framework, but the domain only knows Jumentix contracts.

HTTP framework comparison

AdapterIntegrated technologyBest fitRuntimeHow to start
ExpressMinimal Node.js HTTP framework with middleware, routers, and a broad ecosystem.Teams that want the most familiar REST edge and many off-the-shelf middleware options.Long-running Node/Bun processbun run dev:express
FastifyHigh-performance Node.js HTTP framework with plugin encapsulation and schema-first request handling.APIs with high request volume, strong validation boundaries, and predictable plugin composition.Long-running Node/Bun processbun run dev:fastify
RestifyREST-focused Node.js framework designed for service APIs and explicit request/response handling.Service APIs where explicit REST semantics and operational clarity matter more than ecosystem size.Long-running Node/Bun processbun run dev:restify
AWS LambdaAWS serverless functions invoked by API Gateway, EventBridge, queues, or direct Lambda calls.Event-driven APIs, bursty workloads, and teams already operating on AWS.Serverless function invocationplatform entrypoint
Cloudflare WorkersEdge runtime based on the Web Fetch API, deployed close to users through Cloudflare.Low-latency edge APIs, auth gateways, and browser-aligned request handling.Edge Fetch handlerplatform entrypoint
Vercel FunctionsServerless HTTP functions deployed with Vercel applications and routing.Frontend-adjacent APIs, product teams already deploying through Vercel, and route-level scaling.Serverless request handlerplatform entrypoint
LoopBackAPI framework with strong model, controller, and OpenAPI conventions.Model-heavy APIs that benefit from convention-driven controllers and OpenAPI metadata.Framework-managed Node processplatform entrypoint
Sails.jsMVC-oriented Node.js framework with batteries-included conventions.Convention-heavy server apps that need REST endpoints plus MVC-style structure.Framework-managed Node processplatform entrypoint
FeathersService-oriented Node.js framework for REST and realtime service endpoints.Service APIs that may expose the same behavior through HTTP and realtime channels.Framework-managed Node processplatform entrypoint
Derby.jsFull-stack realtime MVC framework for collaborative applications.Collaborative product surfaces that benefit from realtime MVC conventions at the edge.Framework-managed Node processplatform entrypoint
Adonis.jsTypeScript-first Node.js web framework with strong application conventions.Teams that want a cohesive TypeScript framework around the Jumentix domain boundary.Framework-managed Node processplatform entrypoint
Total.jsFull-stack Node.js framework with integrated web, API, and application tooling.Applications that want a broader framework shell while keeping Jumentix use cases isolated.Framework-managed Node processplatform entrypoint

Fast guide

  • Use Express for familiarity and compatibility.
  • Use Fastify for performance, plugins, and schemas.
  • Use Restify for explicit service REST APIs.
  • Use AWS Lambda, Cloudflare Workers, or Vercel Functions for serverless or edge.
  • Use full frameworks when you want larger edge conventions without contaminating the domain.

Complete selection example

type HttpAdapterChoice = {
  adapter: string;
  runtime: string;
  command?: string;
};

const choices: HttpAdapterChoice[] = [
  { adapter: 'express', runtime: 'Node/Bun process', command: 'bun run dev:express' },
  { adapter: 'fastify', runtime: 'Node/Bun process', command: 'bun run dev:fastify' },
  { adapter: 'restify', runtime: 'Node/Bun process', command: 'bun run dev:restify' },
  { adapter: 'cloudflare-workers', runtime: 'Edge Fetch handler' },
  { adapter: 'aws-lambda', runtime: 'Serverless function' },
  { adapter: 'vercel-functions', runtime: 'Serverless request handler' }
];

export function chooseHttpAdapter(adapter: string): HttpAdapterChoice {
  const choice = choices.find((item) => item.adapter === adapter);

  if (!choice) {
    throw new Error('Unsupported HTTP adapter: ' + adapter);
  }

  return choice;
}