问题
Can anyone provide me a simple example how to implement the "Database per user pattern" in CouchDB (Cloudant <-> PouchDB)? The users get authenticated with Auth0 (jwt). I'm not able to find something regarding this topic.
Any help would be appreciated!
回答1:
here is a sample register/sign-up application using the "one database per user" pattern. you can review it's approach to help you get started.
however, you may want to consider cloudant-envoy which allows your client side code can adopt a "one database per user" design pattern but stores all the users' data in one large database preventing the proliferation of databases.
来源:https://stackoverflow.com/questions/39385757/implement-database-per-user-pattern-in-couchdb-cloudant-pouchdb