postgresql-dist
TypeScript icon, indicating that this package has built-in type declarations

15.6.0-8 • Public • Published

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()

Readme

Keywords

none

Package Sidebar

Install

npm i postgresql-dist

Weekly Downloads

9

Version

15.6.0-8

License

MIT

Unpacked Size

17.2 kB

Total Files

5

Last publish

Collaborators

  • svanterichter