This package has been deprecated

Author message:

hoodie-server-account is now @hoodie/account-server

hoodie-server-account

2.6.19 • Public • Published

hoodie-server-account

Account REST API backed by CouchDB

Build Status Dependency Status devDependency Status

✷ coverage is currently disabled: #37

Usage

var Hapi = require('hapi')
var PouchDB = require('PouchDB')
var hapiAccount = require('hoodie-server-account')
 
PouchDB.plugin(require('pouchdb-users'))
 
var db = new PouchDB('http://localhost:5984/_users')
db.installUsersBehavior().then(function () {
  var options = {
    usersDb: db,
    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);
  });
})

More

License

Apache 2.0

Package Sidebar

Install

npm i hoodie-server-account

Weekly Downloads

14

Version

2.6.19

License

Apache-2.0

Last publish

Collaborators

  • hoodie