Doing a pg.connect(process.env.DATABASE_URL, function(err, client, done) { ... for each http request is a bit tedious ...
|
pg.connect(process.env.DATABASE_URL, function(err, client, done) { |
Investigated potentially using https://www.npmjs.com/package/hapi-pg but its not got any tests and uses https://github.com/brianc/node-postgres-pure which is deprecated. 
I raised an issue: erezlife/hapi-pg#7
Waiting for reply. Will either PR or re-implement (simplify).
Also looked at: https://www.npmjs.com/package/hapi-postgres ... but has no documentation or usage and 
Doing a
pg.connect(process.env.DATABASE_URL, function(err, client, done) { ...for each http request is a bit tedious ...hapi-login-example-postgres/lib/register_handler.js
Line 19 in aca1952
Investigated potentially using https://www.npmjs.com/package/hapi-pg but its not got any tests and uses https://github.com/brianc/node-postgres-pure which is deprecated.
I raised an issue: erezlife/hapi-pg#7
Waiting for reply. Will either PR or re-implement (simplify).
Also looked at: https://www.npmjs.com/package/hapi-postgres ... but has no documentation or usage and