chore: update database ENV keys

pull/3643/head
Luke Edwards 5 years ago
parent 5dda05213e
commit 5e2c524825

@ -2,7 +2,12 @@ NODE_ENV=
PORT= PORT=
BASEURL= BASEURL=
DATABASE_URL=
GITHUB_CLIENT_ID= GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET= GITHUB_CLIENT_SECRET=
MAPBOX_ACCESS_TOKEN= MAPBOX_ACCESS_TOKEN=
PGHOST=hostname
PGPORT=port
PGUSER=username
PGPASSWORD=password
PGDATABASE=database_name

@ -1,8 +1,7 @@
import { Pool } from 'pg'; import { Pool } from 'pg';
export const DB = new Pool({ // Uses `PG*` ENV vars
connectionString: process.env.DATABASE_URL export const DB = new Pool();
});
export function query(text, values=[]) { export function query(text, values=[]) {
return DB.query(text, values).then(r => r.rows); return DB.query(text, values).then(r => r.rows);

Loading…
Cancel
Save