Imagine running a fully functional PostgreSQL database without a backend! π²
With PGlite, you get:
β
Tiny 3MB build β No heavy installs or Docker needed.
β
Runs anywhere β Browser, Node.js, Bun, Deno β no servers required.
β
Persistent storage β Save data in IndexedDB or files on disk.
β
Postgres Extensions β Support for pgvector and more!
π Example (JS) β Run SQL in Node.js or the browser
import { PGlite } from "@electric-sql/pglite";
const db = new PGlite();
const { rows } = await db.query("SELECT 'Hello, Postgres in JS!' AS message;");
console.log(rows);
π Read more + full guide π
https://javascript.plainenglish.io/launch-a-full-sql-db-in-your-browser-or-node-js-with-ease-4462aa1dd3fb
Top comments (0)