Client Admin API for the Hoodie server
hoodie-admin-client
is currently a simple wrapper around the Hoodie Account’s
admin client.
We plan to add APIs to access users’ data and make the Hoodie Admin Client extendable as the Hoodie Client, but there was no need for yet.
var HoodieAdmin = require('@hoodie/admin-client')
var admin = new HoodieAdmin()
if (!admin.isSignedIn()) {
renderLogin()
} else {
admin.accounts.findAll().then(renderAccounts)
}
admin.accounts.on('change', renderAccounts)
Same as AccountAdmin API.
Only difference is that options.url
defaults to location.origin
and AccountAdmin
gets initialised with options.url + '/hoodie/account/api'
.
Local setup
git clone https://github.com/hoodiehq/hoodie-admin-client.git
cd hoodie-admin-client
npm install
Run all tests
npm test
Have a look at the Hoodie project's contribution guidelines. If you want to hang out you can join our Hoodie Community Chat.