I am using a crad package on the node for the couchdb query. Examples of my nodes are the administrator privileges I
I'm looking for the proper way to query the _users table from the node.
Right now, I am doing something like this:
var db = conn.database ('_ users'); Db.exists (function (err, exist) {if (err) {console.log ('error', err);} else if (exists) {db.get ('org.couchdb.user: some_user', function (Err, doc) {console.log (doc);});} else {console.log ('database does not exist.');}});
Is there a cleaner way to do this? Any author library similar to Pouchdb-certification?
That's what I have done At that time, I did not know that I can easily use the pouchback on the node. I am using Plus PoWeb-authentication to simplify the requests to use it.
You can actually use PouchDB at the top of the _users
database :
var db = new PouchDB ('http: // localhost: 5984 / _users'); Db.alldocs ({include_docs: true}). Then (/ * ... * /) // & lt; - All users receive
_users
is just a database :)
No comments:
Post a Comment