dscsa / client

Browser single page application for logging written with Aurelia
3 stars 1 forks source link

Mirror database API on client and server #189

Open akircher opened 8 years ago

akircher commented 8 years ago

Clients uses this.db.drug({inventory:true}) Server uses this.drug.list.inventory()

This will be easier once we migrate to CouchDB 2.0 and have Mango Indexes on the server as well. Then our code can just check if there is a view and run it or if there is no matching view use Mango Indexes instead.

Ideally, we could even make this code fully isomorphic so pouch.js (would need to be renamed) would be run as our database API on both the client and server.