-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee70e41
commit 9c201ea
Showing
7 changed files
with
510 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
.nyc_output | ||
node_modules | ||
/coverage | ||
/.pgpass | ||
/.get-pg-configrc.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
# @jcoreio/get-pg-options | ||
# @jcoreio/get-pg-config | ||
|
||
convenience wrapper for pg-connection-string/pgpass | ||
apply default postgres connection config from dotfiles and .pgpass | ||
|
||
[![CircleCI](https://circleci.com/gh/jcoreio/get-pg-options.svg?style=svg)](https://circleci.com/gh/jcoreio/get-pg-options) | ||
[![Coverage Status](https://codecov.io/gh/jcoreio/get-pg-options/branch/master/graph/badge.svg)](https://codecov.io/gh/jcoreio/get-pg-options) | ||
[![CircleCI](https://circleci.com/gh/jcoreio/get-pg-config.svg?style=svg)](https://circleci.com/gh/jcoreio/get-pg-config) | ||
[![Coverage Status](https://codecov.io/gh/jcoreio/get-pg-config/branch/master/graph/badge.svg)](https://codecov.io/gh/jcoreio/get-pg-config) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) | ||
[![npm version](https://badge.fury.io/js/%40jcoreio%2Fget-pg-options.svg)](https://badge.fury.io/js/%40jcoreio%2Fget-pg-options) | ||
[![npm version](https://badge.fury.io/js/%40jcoreio%2Fget-pg-config.svg)](https://badge.fury.io/js/%40jcoreio%2Fget-pg-config) | ||
|
||
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: | ||
```json | ||
"get-pg-config": { | ||
"defaults": { | ||
"user": "postgres" | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.