{"push_id":1350618608,"size":4,"distinct_size":4,"ref":"refs/heads/master","head":"a282f40122dd29df25cf699071bbd979b3ff25af","before":"69fbe3437b7a06725919f8e356f9833806249fec","commits":[{"sha":"be37aa1332f1f716ee9e7a85f4b6340ccba287e4","author":{"name":"Gregor","email":"ea91fced17e6d4fa3a4177170bd0ec596e28b305@martynus.net"},"message":"docs(README): options.PouchDB","distinct":true,"url":"https://api.github.com/repos/hoodiehq/hoodie-account-server/commits/be37aa1332f1f716ee9e7a85f4b6340ccba287e4"},{"sha":"c2475c758d4d7593fc75027b007a5f9df38bfe89","author":{"name":"Gregor","email":"ea91fced17e6d4fa3a4177170bd0ec596e28b305@martynus.net"},"message":"chore(package): @hoodie/account-server-api@^2.0.0","distinct":true,"url":"https://api.github.com/repos/hoodiehq/hoodie-account-server/commits/c2475c758d4d7593fc75027b007a5f9df38bfe89"},{"sha":"063daac2d5b01e353a1c51cb16b3eafc34ebe8af","author":{"name":"Gregor","email":"ea91fced17e6d4fa3a4177170bd0ec596e28b305@martynus.net"},"message":"test: options.PouchDB","distinct":true,"url":"https://api.github.com/repos/hoodiehq/hoodie-account-server/commits/063daac2d5b01e353a1c51cb16b3eafc34ebe8af"},{"sha":"a282f40122dd29df25cf699071bbd979b3ff25af","author":{"name":"Gregor","email":"ea91fced17e6d4fa3a4177170bd0ec596e28b305@martynus.net"},"message":"feat: options.PouchDB\n\nBREAKING CHANGE:\n\nBefore, `options.usersDb` was passed, pre-initialised with `pouchdb-users`:\n\n```js\nvar Hapi = require(\"hapi\")\nvar PouchDB = require(\"PouchDB\")\nvar hapiAccount = require(\"@hoodie/account-server\")\n\nPouchDB.plugin(require(\"pouchdb-users\"))\n\nvar db = new PouchDB(\"http://localhost:5984/_users\")\ndb.installUsersBehavior().then(function () {\n  var options = {\n    usersDb: db,\n    admins: {\n      admin: \"-pbkdf2-a2ca9d3ee921c26d2e9d61e03a0801b11b8725c6,1081b31861bd1e91611341da16c11c16a12c13718d1f712e,10\"\n    },\n    secret: \"secret123\"\n  })\n\n  server.register({register: hapiAccount, options: options}, function (error) {});\n  server.connection({ port: 8000 });\n  server.start(function () {\n    console.log(\"Server running at %s\", server.info.uri);\n  });\n})\n```\n\nNow, `options.PouchDB` and optionally `options.usersDb` which is only the database name (defaults to `_users`) are passed:\n\n```js\nvar Hapi = require(\"hapi\")\nvar PouchDB = require(\"PouchDB\")\nvar hapiAccount = require(\"@hoodie/account-server\")\n\nvar options = {\n  PouchDB: PouchDB,\n  admins: {\n    admin: \"-pbkdf2-a2ca9d3ee921c26d2e9d61e03a0801b11b8725c6,1081b31861bd1e91611341da16c11c16a12c13718d1f712e,10\"\n  },\n  secret: \"secret123\"\n})\n\nserver.register({register: hapiAccount, options: options}, function (error) {})\nserver.connection({ port: 8000 })\nserver.start(function () {\n  console.log(\"Server running at %s\", server.info.uri)\n})\n```","distinct":true,"url":"https://api.github.com/repos/hoodiehq/hoodie-account-server/commits/a282f40122dd29df25cf699071bbd979b3ff25af"}]}
{"actor":{"display_login":"gr2m"}}