Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@jcoreio/get-pg-config

jcoreio3.1kMIT1.0.1TypeScript support: included

apply default postgres connection config from dotfiles and .pgpass

pg, postgres, node-postgres, node-pg, pgpass

readme

@jcoreio/get-pg-config

apply default postgres connection config from dotfiles and .pgpass

CircleCI Coverage Status semantic-release Commitizen friendly npm version

This solves two minor problems with pg's default connection parameters:

  • it doesn't read ~/.pgpass/PGPASSFILE
  • user defaults to the OS user. In our work we always use Docker and the postgres user, so we can configure that as the default with the following in package.json or .get-pg-configrc etc:
    "get-pg-config": {
      "defaults": {
        "user": "postgres"
      }
    }