db3.aiVisit main site

4 November 2026

JS Backend Framework: 6 Options by Deployment and Project Fit

TL;DR

I would shortlist Hono for multi-runtime HTTP services, Express for a small Node.js web layer, Fastify for schema-led APIs, NestJS for modular backend structure, AdonisJS for conventional web applications, and db3.ai for application services and background work sharing one TypeScript runtime. Choose deployment constraints first. db3.ai's documented installation currently requires maintainer-supplied preview packages.

Choosing a JS backend framework starts with two questions: where must the code run, and what must keep working after an HTTP response finishes?

A compact edge-facing API and a Node.js product with private records, files, scheduled reports, and AI features need different foundations. This comparison is for TypeScript teams selecting a JavaScript backend for APIs or full-stack products. The six options are ordered by application model, not ranked by quality.

Table of contents

Define the framework boundary before comparing features

A runtime executes your code. Node.js is a JavaScript runtime, with HTTP facilities that can support a server without an additional framework.

An HTTP framework organizes requests, routes, middleware, and responses. A broader application framework can supply conventions or services for data, authentication, files, and background work. A full-stack framework also connects backend behavior with a frontend or rendering model.

An application runtime such as db3.ai's App is not a replacement JavaScript engine. The App documentation describes it as an application service hub hosted by your HTTP server, command, or worker.

I would first document the permitted runtime, database connections, persistent storage, process lifetime, and worker hosting. A framework that misses a hard requirement should not win because its route syntax is attractive.

How I selected and compared these options

I selected six documented frameworks representing distinct HTTP and application models. Every assessment covers execution fit, API composition, application scope, and the adoption constraint worth checking first. Recommendations are editorial judgments, not benchmarks. Official documentation was checked on November 4, 2026.

Framework Starting point Useful project fit Verify first
Hono Web Standards HTTP Portable services Dependencies on each runtime
Express Node.js middleware Existing stacks Integration ownership
Fastify Node.js schemas and plugins Focused APIs Schema and plugin conventions
NestJS Node.js modules Shared backend structure HTTP-adapter compatibility
AdonisJS Application conventions Conventional product development Build and package requirements
db3.ai TypeScript application services APIs, data, jobs, and AI Preview access and operations

The linked documentation below establishes these distinctions. This is a shortlist, not an application compatibility certification.

1. Hono: Prioritize runtime portability

Screenshot of hono.dev

Best fit: A focused API or gateway whose HTTP layer should work across multiple JavaScript execution environments.

Hono uses Web Standards. Its runtime documentation describes Fetch-based request and response primitives and support for Cloudflare Workers, Deno, Bun, AWS Lambda, and Node.js. That differs from selecting a Node-oriented framework and later searching for an edge adaptation.

For Node deployments, its Node.js guide uses an adapter and assigns server shutdown to the application.

Adoption constraint: Portable HTTP code does not certify portable dependencies. Inventory database clients, filesystem access, secrets, and background execution separately. I would choose Hono when runtime flexibility matters more than a wider product convention, then test the complete dependency set on the intended host. Records, accounts, files, and workers still need an application design around that HTTP layer.

2. Express: Preserve an established Node.js stack

Screenshot of expressjs.com

Best fit: An existing Node.js application that needs a straightforward HTTP layer without replacing surrounding infrastructure.

Express provides routing and middleware. Its Express 5 middleware guide describes middleware calls that modify requests, produce responses, or pass control onward. Application-level and router-level middleware provide explicit composition points.

That narrow scope can be useful when identity, persistence, telemetry, and job processing are already standardized. A broader framework may solve problems your team has already addressed.

Adoption constraint: Make integration ownership visible. Who defines runtime validation, errors, authorization, persistence conventions, and worker handoffs? Choosing Express does not choose the reliability or deployment model of those other components. I would favor it when preserving existing architecture is a benefit, not when minimal installation is mistaken for a complete backend.

3. Fastify: Center APIs on schemas and plugin boundaries

Screenshot of fastify.dev

Best fit: A Node.js API team wanting a focused server with explicit network contracts.

Fastify combines routes, hooks, decorators, and plugins. Its validation reference documents JSON Schema request validation and response serialization. This creates a concrete home for contracts rather than relying on handler annotations alone.

Its encapsulation model controls which plugins, hooks, and decorators routes can access. Children inherit from parents; parents do not automatically receive child registrations.

Adoption constraint: Agree on schema ownership and plugin scope early. Fastify warns against untrusted user-provided schemas because compilation treats definitions as application code. Identity, persistence, files, and durable work remain surrounding design choices. I would choose it for its API development model, then measure the actual workload rather than projecting homepage throughput onto a database-backed product.

4. NestJS: Standardize application structure

Screenshot of docs.nestjs.com

Best fit: Teams benefiting from consistent homes for controllers, providers, modules, and bootstrapping.

The NestJS first-steps guide demonstrates a module-oriented Node.js application supporting TypeScript and JavaScript. Evaluate how comfortably your team expresses domain boundaries in that model.

Distinguish HTTP-adapter choice from runtime portability. The current adapter documentation covers Express, Fastify, and a direct Node.js adapter. It recommends the Node adapter starting with NestJS 12.3, while Express remains the default when no adapter is supplied.

Adoption constraint: Check your selected version and adapter against middleware, uploads, GraphQL integrations, and direct request/response access. Adapter flexibility inside Node.js is not the same promise as multi-runtime Fetch portability. I would choose NestJS when shared structure repays its learning cost and the team wants to select product services around it.

5. AdonisJS: Adopt conventional product-development patterns

Screenshot of adonisjs.com

Best fit: A product team preferring a documented path through routing, validation, models, authentication, and rendering.

AdonisJS is a backend-first TypeScript framework. Its introduction describes MVC conventions, ORM-backed development, and an optional view layer for API-only or full-stack applications.

The current deployment guide requires Node.js 24 or later and a compiled standalone build. Production dependencies and environment configuration still need provisioning. Uploads should not live inside a replaceable build directory.

Adoption constraint: Verify optional packages independently. The queue guide labels @adonisjs/queue experimental and recommends version pinning. It documents separate workers with Redis or database backends. I would trial that dependency if recoverable work is a launch requirement, rather than treating overall framework maturity as evidence about every service.

6. db3.ai: Share services across APIs and background work

Screenshot of db3.ai

Best fit: A TypeScript product joining APIs, data, authentication, storage, scheduled work, and server-side AI.

Our @db3.ai/app documentation exposes service entry points for these concerns. Your application still owns routes, models, authorization, credentials, and business workflows. The HTTP walkthrough pairs these services with Fastify rather than replacing the listener with App.

Deployment fit: The installation guide uses Node.js 24 or newer for walkthroughs and currently requires matching maintainer-supplied App and Pure preview tarballs. Documented database-backed Auth, ActiveRecord, Media, Queue, and Scheduler paths need MariaDB/MySQL.

Adoption constraint: The lifecycle reference specifies one active App per process. Hosts own workers and transports; App.close() does not drain queue workers or close a Redis queue driver. Check preview access and operational requirements before committing.

A db3.ai example: schedule a daily report status

A scheduled report exposes a boundary that HTTP routing alone does not address: deciding when work becomes due and executing it outside the request.

This feature module adapts the documented Scheduler example. It is a registration module, not a standalone server or production bootstrap.

import { QueueableJob } from '@db3.ai/app/queue';
import { app } from '@db3.ai/app/server';

export class WriteReportStatusJob extends QueueableJob {
  static readonly jobName = 'write-report-status';

  constructor() {
    super({});
  }

  async handle(): Promise<void> {
    await app().storage.write('reports/latest.txt', 'Report ready');
  }
}

export function registerReportSchedule(): void {
  app().queue.registerJob(WriteReportStatusJob);
  app().scheduler
    .job(WriteReportStatusJob)
    .dailyAt('09:00')
    .timezone('UTC');
}

Setup: Install matching preview packages and documented development tools. Create one configured App, configure storage, migrate the Scheduler and database Queue tables, and register jobs at boot in relevant workers. These deployment pieces are not included in the module.

For the complete isolated lab, configure its dedicated MariaDB/MySQL test account, then copy and run the shipped example:

mkdir -p examples
cp -R node_modules/@db3.ai/app/src/scheduler/examples/. examples/
npx tsx examples/runDailySummary.ts

The documentation describes fixed-minute evaluation, duplicate-claim rejection, queue processing, and output checks. We have not executed the lab or adapted module here.

You still need a supervised scheduler runner and queue worker. The Scheduler reference documents a crash gap between claiming and dispatching; claims are not exactly-once guarantees. The shared output file also needs an application-specific concurrency policy for real reports. Stop workers and transports before closing App.

Choose by constraints, then prove the fit

Use a short decision path:

  • Multiple runtimes: Start with Hono and verify dependencies on each host.
  • Node.js with established infrastructure: Compare Express and Fastify's composition models.
  • Shared backend structure: Trial NestJS and its selected adapter.
  • Conventional application defaults: Evaluate AdonisJS against the intended data and frontend model.
  • Shared product-service APIs: Include db3.ai, checking preview and operational constraints.

For each finalist, draw the HTTP process, workers, scheduler, database, storage, secrets, and migration step. A box nobody owns matters more than a missing feature-table checkmark.

Then implement one protected API operation and one feature that outlives the response. Stop the worker and inspect what the user sees. Record integration effort and recovery steps, not only route length. This is an evaluation scenario, not a promise that every framework supplies it automatically.

Compare operating costs separately from framework installation: hosting, data stores, provider charges, upgrades, and incident response. No verified db3.ai price is quoted here.

Adoption checklist

Before committing, verify that:

  • Exact framework and dependency versions run on the intended host.
  • Invalid inputs produce the expected public errors.
  • Authentication and record-level authorization have separate tests.
  • Production builds start with declared dependencies and configured secrets.
  • Uploads and job state survive deployments where required.
  • Shutdown, provider failure, retries, and operator recovery are understood.

Frequently asked questions

Is Node.js itself a backend framework?

No. Node.js is the runtime. A framework adds HTTP or application conventions above it.

Does a full-stack product require one full-stack framework?

Not necessarily. I would compare a shared application boundary with a separate frontend, then assign ownership of API contracts, rendering, and deployment explicitly.

Next step

Pick two candidates that satisfy your deployment constraints. Build and stop the same representative feature in each. To evaluate our application model, start with the db3.ai installation guide and its scheduled-work lab using test-only infrastructure.

Sources