loopback-connector-couchdb
What
A connector is used to connect Loopback models to a storage, and in this case, a CouchDB DB. See the official doc for Connecting models to data sources.
How to
Config
Example:
// server/datasources.json
Install design docs
The designDocs
that you put in the datasource config can be installed with autoupdate()
or automigrate()
. Example:
// server/datasources.json
Use a view
Example:
// Assuming you have a connector instance.// Note that `connect()` returns a cached connection (singleton, promisified, wrapped in a Bluebird promise).connector;
See the tests for more examples.