Skip to content

Commit

Permalink
Make grainstore database name configuration explicit (#125)
Browse files Browse the repository at this point in the history
Attempts to retrieve the `dbname` attribute without it being set
silently return nothing. This is problematic in scenarios where a
connection string is being built, and a missing database name defaults
to the UNIX username that initiated the connection attempt.
  • Loading branch information
hectcastro committed Oct 22, 2019
1 parent 514cd77 commit 65328ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ var windshaftConfig = {
user: process.env.OTM_DB_USER || 'otm',
password: process.env.OTM_DB_PASSWORD || 'otm',
host: process.env.OTM_DB_HOST || 'localhost',
port: process.env.OTM_DB_PORT || 5432
port: process.env.OTM_DB_PORT || 5432,
dbname: dbname
}
}, // See grainstore npm for other options

Expand Down

0 comments on commit 65328ad

Please sign in to comment.