benoitc / couchbeam

Apache CouchDB client in Erlang
Other
242 stars 113 forks source link

How do I reuse connections in couchbeam? #99

Closed ghost closed 10 years ago

ghost commented 10 years ago

I am building a cowboy application. I would like to open a connection to couchDb once and then reuse everywhere else. How can I do this?

Thanks.

benoitc commented 10 years ago

By default couchbeam is using a default pool to reuse the connections.

If you want to use a different configuation you can pass a pool setting when initialising the server. Like in hackney:

https://github.com/benoitc/hackney#use-the-default-pool

ghost commented 10 years ago

Thank you for your answer.