Socket
Socket
Sign inDemoInstall

http-pouchdb

Package Overview
Dependencies
263
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    http-pouchdb

Access remote CouchDB databases like you would access your local PouchDB ones.


Version published
Maintainers
3
Install size
19.9 MB
Created

Readme

Source

http-pouchdb

Build Status Dependency Status devDependency Status

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.

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.

Keywords

FAQs

Last updated on 20 Dec 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc