npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

zerodb-neon

v1.0.0

Published

Neon serverless Postgres compatible driver backed by ZeroDB. Same tagged template syntax, zero vendor lock-in, plus DB event triggers.

Readme

zerodb-neon

Neon serverless Postgres compatible driver backed by ZeroDB. Same tagged template syntax you already know. Zero config. Auto-provisioning. Plus DB event triggers that Neon doesn't have.

npm License: MIT

Why switch?

| Feature | @neondatabase/serverless | zerodb-neon | |---------|------------------------|-------------| | Tagged template SQL | Yes | Yes | | Auto-provisioning | No (need connection string) | Yes (zero config) | | DB event triggers | No | Yes (onInsert/onUpdate/onDelete) | | Vendor lock-in | Neon only | Runs anywhere | | Free tier | 512 MB | 100 MB + vectors + files |

Quick Start

npm install zerodb-neon
import { neon } from 'zerodb-neon';

// Auto-provisions a free ZeroDB Postgres instance (no connection string needed)
const sql = neon();

// Query with tagged template syntax (identical to Neon)
const users = await sql`SELECT * FROM users WHERE active = ${true}`;
console.log(users); // [{ id: 1, name: 'Alice', active: true }]

// Parameterized queries — safe by default
const name = 'Bob';
const result = await sql`INSERT INTO users (name) VALUES (${name}) RETURNING *`;

Migration from Neon

- import { neon } from '@neondatabase/serverless';
+ import { neon } from 'zerodb-neon';

- const sql = neon(process.env.DATABASE_URL);
+ const sql = neon(); // auto-provisions, or pass { apiKey, projectId }

// Everything else stays the same
const users = await sql`SELECT * FROM users`;

DB Event Triggers

The killer feature Neon doesn't have:

import { neon } from 'zerodb-neon';

const sql = neon();

// React to database changes in real-time
sql.onInsert('users', async (row) => {
  console.log('New user:', row);
  // Send welcome email, update analytics, etc.
});

sql.onUpdate('orders', async (row) => {
  console.log('Order updated:', row);
});

sql.onDelete('sessions', async (row) => {
  console.log('Session expired:', row);
});

Full Results Mode

const sql = neon({ fullResults: true });

const result = await sql`SELECT * FROM users`;
// { rows: [...], fields: [...], rowCount: 5, command: 'SELECT' }

Array Mode

const sql = neon({ arrayMode: true });

const rows = await sql`SELECT id, name FROM users`;
// [[1, 'Alice'], [2, 'Bob']]

Transactions

const sql = neon();

await sql.transaction(async (tx) => {
  await tx`INSERT INTO accounts (name, balance) VALUES (${'Alice'}, ${1000})`;
  await tx`UPDATE accounts SET balance = balance - ${100} WHERE name = ${'Bob'}`;
});

Pool & Client (Neon compat)

import { Pool, Client } from 'zerodb-neon';

// Pool — ZeroDB manages connection pooling server-side
const pool = new Pool({ apiKey: 'your-key', projectId: 'your-project' });
const result = await pool.query('SELECT * FROM users WHERE id = $1', [1]);
await pool.end();

// Client
const client = new Client();
await client.connect();
const rows = await client.query('SELECT NOW()');
await client.end();

Configuration

// Option 1: Environment variables (recommended)
// ZERODB_API_KEY=your-key
// ZERODB_PROJECT_ID=your-project
const sql = neon();

// Option 2: Explicit config
const sql = neon({
  apiKey: 'your-key',
  projectId: 'your-project',
  fullResults: false,
  arrayMode: false,
});

// Option 3: Connection string (Neon compat)
const sql = neon('postgresql://apiKey@zerodb/projectId');

Environment Variables

| Variable | Description | |----------|-------------| | ZERODB_API_KEY | ZeroDB API key | | ZERODB_PROJECT_ID | ZeroDB project ID | | NEON_API_KEY | Alias for ZERODB_API_KEY (migration compat) |


Built by AINative Studio | ZeroDB Docs | GitHub

Migrate from Neon in 2 minutes. Get DB event triggers for free.

npm install zerodb-neon