Socket
Socket
Sign inDemoInstall

pg-pool

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-pool - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

3

index.js

@@ -5,6 +5,7 @@ var genericPool = require('generic-pool')

var debug = require('debug')
var objectAssign = require('object-assign')
var Pool = module.exports = function (options, Client) {
EventEmitter.call(this)
this.options = options || {}
this.options = objectAssign({}, options)
this.log = this.options.log || debug('pg:pool')

@@ -11,0 +12,0 @@ this.Client = this.options.Client || Client || require('pg').Client

{
"name": "pg-pool",
"version": "1.0.2",
"version": "1.0.3",
"description": "Connection pool for node-postgres",

@@ -40,4 +40,5 @@ "main": "index.js",

"debug": "^2.2.0",
"generic-pool": "2.4.2"
"generic-pool": "2.4.2",
"object-assign": "4.1.0"
}
}

@@ -129,2 +129,16 @@ # pg-pool

### environment variables
pg-pool & node-postgres support some of the same environment variables as `psql` supports. The most common are:
```
PGDATABASE=my_db
PGUSER=username
PGPASSWORD="my awesome password"
PGPORT=5432
PGSSLMODE=require
```
Usually I will export these into my local environment via a `.env` file with environment settings or export them in `~/.bash_profile` or something similar. This way I get configurability which works with both the postgres suite of tools (`psql`, `pg_dump`, `pg_restore`) and node, I can vary the environment variables locally and in production, and it supports the concept of a [12-factor app](http://12factor.net/) out of the box.
## tests

@@ -131,0 +145,0 @@

@@ -54,2 +54,13 @@ var expect = require('expect.js')

})
it('should not change given options', function (done) {
var options = { max: 10 }
var pool = new Pool(options)
pool.connect(function (err, client, release) {
release()
if (err) return done(err)
expect(options).to.eql({ max: 10 })
pool.end(done)
})
})
})

@@ -56,0 +67,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc