brianc / node-pg-pool

A connection pool for node-postgres
MIT License
180 stars 64 forks source link

Problems with creating the pool object #20

Closed riston closed 8 years ago

riston commented 8 years ago

I used the Heroku example to create a pool, but I get such error.

  this.options.create = this.options.create || this._create.bind(this)
                                                           ^

TypeError: Cannot read property 'bind' of undefined
[0]                                                 

Basically after debugging the code I see that the this._create, this._destroy is undefined (https://github.com/brianc/node-pg-pool/blob/master/index.js#L14).

--- Edit After creating the issue I found the problem, no "new" was provided for Pool instance creation.