Skip to content

Commit

Permalink
fix PGUSERNAME->PGUSER env var
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewberryman committed Feb 7, 2017
1 parent c0d9e07 commit 36449c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Server configuration parameters are stored in a configuration file which is pars
* `PGPORT`: Postgres DB port (default: `5432`)
* `PGSSL`: SSL enabled on Postgres DB connection? (default: `false`)
* `PGTIMEOUT`: Max duration on DB calls before timeout (in milliseconds) (default: `5000` i.e. 5 seconds)
* `PGUSERNAME`: Postgres DB username (default: `postgres`)
* `PGUSER`: Postgres DB username (default: `postgres`)
* `FORMAT_DEFAULT`: Which format to return results in by default (default: `json`)
* `FORMATS`: Formats supported by the system (as comma separated list) (default: `json,xml`)
* `GEO_FORMAT_DEFAULT`: Which format to return geographic results in by default (default: `topojson`)
Expand Down
2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AUTH0_CLIENT_ID=auth0_client_id_goes_here
AUTH0_SECRET=auth0_secret_goes_here
PGHOST=127.0.0.1
PGPORT=5432
PGUSERNAME=cognicity
PGUSER=cognicity
PGPASSWORD=PGPASSWORD_goes_here
PGDATABASE=cognicity
LOG_DIR=/tmp/cognicity
Expand Down
2 changes: 1 addition & 1 deletion src/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const pgp = require('pg-promise')({
export default (config, logger) => new Promise((resolve, reject) => {

// Build the connection string
const cn = `postgres://${config.PGUSERNAME}:${config.PGPASSWORD}@${config.PGHOST}:${config.PGPORT}/${config.PGDATABASE}?ssl=${config.PGSSL}`;
const cn = `postgres://${config.PGUSER}:${config.PGPASSWORD}@${config.PGHOST}:${config.PGPORT}/${config.PGDATABASE}?ssl=${config.PGSSL}`;
logger.debug(cn);

// Setup the connection
Expand Down

0 comments on commit 36449c9

Please sign in to comment.