brianc / node-pg-pool

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

Url parsing example #19

Closed timhaley94 closed 8 years ago

timhaley94 commented 8 years ago

I was struggling to get pg-pool working on Heroku, and after a couple of hours I stumbled upon this PR: https://github.com/brianc/node-pg-pool/pull/5, and realized that the Pool constructor could not accept a DatabaseURL string.

I saw that you were considering adding an example of parsing a DatabaseURL to the readme. I thought I would go ahead and put in a PR in case anyone else runs into the same problem.

Let me know if I should change anything or if you do not think it is worth an example in the readme. Thanks for your contributions, I like these pg modules a lot!

Also, here's a screenshot in case you want a visual preview:

screen shot 2016-07-18 at 3 11 59 pm
brianc commented 8 years ago

This, my friend, is fantastic! Super appreciate the documentation & support! 💃

timhaley94 commented 8 years ago

Thanks! I look forward to contributing in the future.