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

hoodiehq / hoodie-account-server / 895
94%

Build:
DEFAULT BRANCH: master
Ran 15 Oct 2016 08:18PM UTC
Jobs 1
Files 14
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
895

push

travis-ci

gr2m
feat: options.PouchDB

BREAKING CHANGE:

Before, `options.usersDb` was passed, pre-initialised with `pouchdb-users`:

```js
var Hapi = require("hapi")
var PouchDB = require("PouchDB")
var hapiAccount = require("@hoodie/account-server")

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

var db = new PouchDB("http://localhost:5984/_users")
db.installUsersBehavior().then(function () {
  var options = {
    usersDb: db,
    admins: {
      admin: "-pbkdf2-<a class=hub.com/hoodiehq/hoodie-account-server/commit/a2ca9d3ee921c26d2e9d61e03a0801b11b8725c6">a2ca9d3ee<a href="https://github.com/hoodiehq/hoodie-account-server/commit/a282f40122dd29df25cf699071bbd979b3ff25af">,<a class=hub.com/hoodiehq/hoodie-account-server/commit/1081b31861bd1e91611341da16c11c16a12c1371">1081b31868d1f712e,10"
    },
    secret: "secret123"
  })

  server.register({register: hapiAccount, options: options}, function (error) {});
  server.connection({ port: 8000 });
  server.start(function () {
    console.log("Server running at %s", server.info.uri);
  });
})
```

Now, `options.PouchDB` and optionally `options.usersDb` which is only the database name (defaults to `_users`) are passed:

```js
var Hapi = require("hapi")
var PouchDB = require("PouchDB")
var hapiAccount = require("@hoodie/account-server")

var options = {
  PouchDB: PouchDB,
  admins: {
    admin: "-pbkdf2-a2ca9d3ee921c26d2e9d61e03a0801b11b8725c6,1081b31861bd1e91611341da16c11c16a12c13718d1f712e,10"
  },
  secret: "secret123"
})

server.register({register: hapiAccount, options: options}, function (error) {})
server.connection({ port: 8000 })
server.start(function () {
  console.log("Server running at %s", server.info.uri)
})
```

325 of 348 relevant lines covered (93.39%)

10.65 hits per line

Jobs
ID Job ID Ran Files Coverage
1 895.1 15 Oct 2016 08:18PM UTC 0
93.39
Travis Job 895.1
Source Files on build 895
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #895
  • a282f401 on github
  • Prev Build on master (#892)
  • Next Build on master (#896)
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