share / sharedb-postgres

PostgreSQL adapter for ShareDB
MIT License
46 stars 22 forks source link

Add Connection Pooling #5

Closed billwashere closed 6 years ago

billwashere commented 6 years ago

This commit adds Connection Pooling as well as the ability to pass database details via environment arguments.

nornagon commented 6 years ago

Awesome, thanks for separating this out! I pulled it down locally to do some testing and it looks like the old style of passing a database URL a la postgres://$HOST:$PORT/$DB_NAME is no longer supported in pg. That's a breaking change, so we should document it in a changelog (that doesn't yet exist) and bump the major version.

billwashere commented 6 years ago

You should be able to pass in the connection string by going

{
  connectionString:"postgres://$HOST:$PORT/$DB_NAME"
} We

Instead of host and port

nornagon commented 4 years ago

(...belatedly), i've published v3.0.0 to npm.