Licence
MIT
Version
15.6.0-8
Deps
0
Size
157.6 MB
Vulns
0
Weekly
0
postgresql-dist
Use postgresql as an npm module for tighter integration with node apps (e.g. test fixtures).
Usage
npm install postgresql-dist
import postgresql from 'postgresql-dist'
import pg from 'pg'
const postgresqlServer = await postgresql()
const client = new pg.Client({
host: postgresqlServer.socketDir,
database: 'postgres',
})
await client.connect()
console.log((await client.query('SELECT NOW()')).rows)
await client.end()
await postgresqlServer.stop()
Credits
- Based on https://github.com/zonkyio/embedded-postgres-binaries
- With added webauthn extension from https://github.com/truthly/pg-webauthn (SQL only)
- Based on
- RUM indexes from https://github.com/postgrespro/rum
- With added webauthn extension from https://github.com/truthly/pg-webauthn (SQL only)
TODO
- Enable macos/windows to use the webauthn extension