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)