{"id":13555065,"url":"https://github.com/tyler-johnson/pouchdb-couchdb","last_synced_at":"2026-06-07T21:01:11.572Z","repository":{"id":57328999,"uuid":"50327072","full_name":"tyler-johnson/pouchdb-couchdb","owner":"tyler-johnson","description":"Provides some extra CouchDB sugar to PouchDB.","archived":false,"fork":false,"pushed_at":"2016-02-15T20:01:19.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-16T22:32:07.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyler-johnson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-25T04:56:18.000Z","updated_at":"2017-01-09T00:20:37.000Z","dependencies_parsed_at":"2022-09-15T01:02:57.846Z","dependency_job_id":null,"html_url":"https://github.com/tyler-johnson/pouchdb-couchdb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-johnson%2Fpouchdb-couchdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-johnson%2Fpouchdb-couchdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-johnson%2Fpouchdb-couchdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-johnson%2Fpouchdb-couchdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyler-johnson","download_url":"https://codeload.github.com/tyler-johnson/pouchdb-couchdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240926399,"owners_count":19879737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:03:00.898Z","updated_at":"2026-06-07T21:01:10.827Z","avatar_url":"https://github.com/tyler-johnson.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# PouchDB CouchDB\n\n[![npm](https://img.shields.io/npm/v/pouchdb-couchdb.svg)](https://www.npmjs.com/package/pouchdb-couchdb) [![David](https://img.shields.io/david/tyler-johnson/pouchdb-couchdb.svg)](https://david-dm.org/tyler-johnson/pouchdb-couchdb) [![Build Status](https://travis-ci.org/tyler-johnson/pouchdb-couchdb.svg?branch=master)](https://travis-ci.org/tyler-johnson/pouchdb-couchdb)\n\nThis is some sugar for PouchDB to make handling true CouchDB servers a little easier.\n\n- Set a base url for all databases.\n- Maintains instance-level authorization for all databases, with support for basic auth and cookies.\n- Change authentication at any point, ensuring that all existing databases switch as well.\n- Configure CouchDB.\n\n## Install\n\nGrab a copy from NPM:\n\n```bash\nnpm install pouchdb-couchdb --save\n```\n\n## Usage\n\nPouchDB traditionally returns a class to create databases from. PouchDB-CouchDB on the other hand returns a function to create those classes so that a base url and default options can be passed in.\n\n```js\nvar CouchDB = require(\"pouchdb-couchdb\")(\"http://localhost:5984\");\nvar db = new CouchDB(\"mydb\");\n```\n\nFor reference, here's how the same code would be accomplished using pure PouchDB. Keep in mind that this would need to be repeated for *every* database.\n\n```js\nvar PouchDB = require(\"pouchdb\");\nvar db = new PouchDB(\"http://localhost:5984/mydb\");\n```\n\nYou have your class sign in and out of the database with the `signIn()` and `signOut()` methods. This will ensure the same authentication is applied for all databases created with this class.\n\n```js\nCouchDB.signIn(\"user\",\"password\").then(function() {\n  console.log(\"signed in!\");\n\n  return CouchDB.signOut();\n}).then(function() {\n  console.log(\"signed out!\");\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler-johnson%2Fpouchdb-couchdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyler-johnson%2Fpouchdb-couchdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler-johnson%2Fpouchdb-couchdb/lists"}