Skip to content

Document environment variables #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2020
Merged

Document environment variables #48

merged 2 commits into from
Mar 17, 2020

Conversation

karlhorky
Copy link
Contributor

Hi there, thanks again for your effort on this library!

Just wanted to quickly document the environment variables that are being used by the library:

postgres/lib/index.js

Lines 485 to 494 in 758b5ee

, host = o.hostname || o.host || url.hostname || env.PGHOST || 'localhost'
, port = o.port || url.port || env.PGPORT || 5432
return Object.assign({
host,
port,
path : o.path || host.indexOf('/') > -1 && host + '/.s.PGSQL.' + port,
database : o.database || o.db || (url.pathname || '').slice(1) || env.PGDATABASE || 'postgres',
user : o.user || o.username || auth[0] || env.PGUSERNAME || env.PGUSER || os.userInfo().username,
pass : o.pass || o.password || auth[1] || env.PGPASSWORD || '',

@porsager
Copy link
Owner

Ah, great! Thanks a lot!

@porsager porsager merged commit 7a4ef4b into porsager:master Mar 17, 2020
@karlhorky
Copy link
Contributor Author

No worries, glad to help :) Thanks for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants