GitHub - electric-sql/pglite: PGlite - Postgres in WASM
PGlite - Postgres in WASM
PGlite is a WASM Postgres build packaged into a TypeScript client library that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It is only 3.7mb gzipped.
import { PGlite } from "@electric-sql/pglite"
const db = new PGlite
await db.query("select 'Hello world' as message;")
// -> [ { message: "Hello world" } ]
It can be used both as an ephemeral in-memory database or with persistance to the file system (Node/Bun)...
Read more at github.com