• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hoodiehq / hoodie-account-server-api / 16
100%

Build:
DEFAULT BRANCH: master
Ran 15 Oct 2016 05:58AM UTC
Jobs 1
Files 20
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
16

push

travis-ci

gr2m
feat: options.PouchDB

BREAKING CHANGE:

Before, `options.db` had to be passed to the Api constructor, pre-initialised with `"pouchdb-users"`:

```js
var AccountApi = require("@hoodie/account-server-api")
var PouchDB = require("pouchdb")

PouchDB.plugin(require("pouchdb-users"))

var db = new PouchDB("http://localhost:5984/_users")

db.installUsersBehavior().then(function () {
  var api = new AccountApi({
    db: db,
    secret: "secret123"
  })

  api.accounts.findAll().then(logAccountStats)
  api.accounts.on("change", logAccountChange)
})
```

Now, `options.PouchDB` is enough. Optionally `options.usersDb` for a custom users db name can be passed (it defaults to `_users`):

```js
var AccountApi = require("@hoodie/account-server-api")
var PouchDB = require("pouchdb")
  .plugin(require("pouchdb-users"))

var api = new AccountApi({
  PouchDB: PouchDB,
  usersDb: "my-users-db",
  secret: "secret123"
})
```

129 of 193 relevant lines covered (66.84%)

1.07 hits per line

Jobs
ID Job ID Ran Files Coverage
1 16.1 15 Oct 2016 05:58AM UTC 0
66.84
Travis Job 16.1
Source Files on build 16
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #16
  • e18d4c4c on github
  • Next Build on master (#17)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc