4.2.0 • Published 5 years ago

http-pouchdb v4.2.0

Weekly downloads
1,559
License
Apache-2.0
Repository
github
Last release
5 years ago

http-pouchdb

Access remote CouchDB databases like you would access your local PouchDB ones. Tested support for new PouchDB('name'), PouchDB.replicate('name', 'name'), PouchDB.destroy('name') and, as a bonus, PouchDB.allDbs().

Example

npm install pouchdb http-pouchdb
var PouchDB = require('pouchdb');
var HttpPouchDB = require('http-pouchdb')(PouchDB, 'http://localhost:5984');

var db = new HttpPouchdb('_users');
console.log(HttpPouchDB.isHTTPPouchDB) //-> true
// 'db' will be backed by http://localhost:5984/_users ; You can use it
// like any PouchDB database.

API

NodeJS package name: http-pouchdb

Browser object name: window.buildHTTPPouchDB

Browser usage

<script src='somewhere/pouchdb.min.js'></script>
<script src='dist/http-pouchdb.min.js'></script>
<script>
  var HttpPouchDB = buildHTTPPouchDB(PouchDB, 'http://localhost:5984/test');
  // use HttpPouchdb as above.
</script>

API

  • module.exports = function (PouchDB, name, opts) -> PouchDB2
  • name: The base url you want to use. Needs a trailing '/'.
  • opts: opts.headers and opts.auth.

Source

PouchDB Server and its sub-packages are distributed as a monorepo.

For a full list of packages, see the GitHub source.

License

The Apache 2 License. See the LICENSE file for more information.

4.2.0

5 years ago

4.1.0

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

2.1.2

7 years ago

2.1.0

7 years ago

2.1.1

7 years ago

2.0.0

7 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago