Overview
@neondatabase/serverless is Neon’s PostgreSQL driver for JavaScript and TypeScript. It is:
- Low-latency, thanks to message pipelining and other optimizations
- Built for serverless and edge runtimes such as Cloudflare Workers, using HTTPS and WebSockets in place of raw TCP
- A drop-in replacement for node-postgres (
pg), on which it is based
Install
npm install @neondatabase/serverless
TypeScript types are included. The README explains how to alias it in place of pg for packages that depend on node-postgres.