PACKAGE · SERVERLESS DATABASE

@neondatabase/serverless

node-postgres for serverless environments from neon.com

WEEKLY DOWNLOADS 8.2M
STARS 559
FORKS 96
OPEN ISSUES 60
GZIP SIZE 47.4 kB
UNPACKED SIZE 443.0 kB
DEPENDENCIES 1
LAST UPDATED 10mo ago
DOWNLOAD TRENDS

@neondatabase/serverless downloads · last 12 months

Download trends for @neondatabase/serverless1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.05.7M11.4M17.0M22.7MNov 2025FebMayAugOct 2026
@neondatabase/serverless
ABOUT @NEONDATABASE/SERVERLESS

@neondatabase/serverless is a serverless-oriented PostgreSQL client described as node-postgres for serverless environments from Neon. It provides a way for JavaScript and TypeScript applications to connect to PostgreSQL in environments such as Cloudflare Workers, where a conventional long-lived Node.js process cannot be assumed.

The package is aimed at developers using Neon and PostgreSQL from serverless runtimes, including Cloudflare Workers. Its focus is adapting database access to those execution environments; it is not a database server or a general-purpose replacement for PostgreSQL itself.

Applications use the package’s database connection and query APIs to issue SQL against PostgreSQL. Treat database access as part of the serverless request workflow, and check the package documentation for the supported connection and query patterns before choosing an approach, since the supplied package details do not specify individual API signatures or runtime constraints.

The listed ecosystem includes JavaScript, TypeScript, PostgreSQL, Neon, and Cloudflare Workers, so it fits projects that need PostgreSQL access in serverless application code. Its stated focus also makes it relevant to serverless database workflows where application code runs in a compatible environment and connects to a Neon-hosted database.

Version 1.2.1 is listed with a 47.4 kB gzip bundle size and 443.0 kB unpacked size. The package has 7.9M weekly downloads, 557 GitHub stars, 92 forks, and 55 open issues; these figures provide adoption and maintenance context, but do not establish query latency or compatibility with a particular runtime version.

Before adopting it, verify that your target runtime and required PostgreSQL access pattern are supported by the package’s documentation. The provided details do not describe pooling behavior, transaction constraints, or specific API limitations, so those should be confirmed rather than assumed.

WHEN TO USE
  • When connecting a Neon PostgreSQL database from Cloudflare Workers, use this package’s serverless-oriented client rather than assuming a conventional long-lived Node.js process.
  • When building JavaScript or TypeScript serverless code that needs PostgreSQL access, use the package’s connection and query APIs and confirm the supported patterns in its documentation.
  • When your application’s database work runs within serverless request handling, evaluate this client for issuing SQL against PostgreSQL from that execution environment.
  • When working in a Neon-based PostgreSQL workflow, use the package identified specifically as Neon’s serverless node-postgres offering.
  • When comparing client options for a Cloudflare- or serverless-tagged project, consider the package’s stated runtime focus and its 47.4 kB gzip bundle size.
WHEN NOT TO USE
  • If your deployment requires a database client explicitly documented for a runtime not covered by this package’s serverless focus, choose a client whose documentation confirms that runtime’s support.
  • If the application depends on a connection-pooling or transaction behavior that you cannot verify here, confirm the package’s documented constraints first or use a client whose required behavior is clearly documented.
  • If you need a PostgreSQL client for a conventional Node.js deployment and do not need the serverless focus, compare it with a client designed for that deployment model.
  • If your application does not use PostgreSQL or Neon-compatible database workflows, use a data-access tool designed for the database and protocol you actually operate.
  • If a project has a strict bundle-size ceiling below the package’s listed 47.4 kB gzip size, measure its impact in the target build and select a smaller client if it exceeds that limit.
  • If you require confirmed support for a specific framework or runtime version, verify compatibility in the package documentation before adoption; the supplied details do not list supported versions.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 3
@neondatabase/serverless vs @tursodatabase/serverless ★ 25.4K · 90.3K/wk @neondatabase/serverless vs @planetscale/database ★ 1.2K · 814.8K/wk @neondatabase/serverless vs @libsql/client ★ 578 · 5.9M/wk