Hey Raymond,
There are a couple ways you could do it:
1) Configure your CouchDB database so that everybody has read access, but only admins have write access. This is described in the pouchdb-authentication docs [1]. Then to do a one-way replication, you just use db.replicate.from() instead of db.sync().
2) Or if performance is critical, and if your data doesn't change very often, use pouchdb-dump-cli [2] to dump to a file, then use pouchdb-load [3] to load that file on the client.
I've sometimes done a mixed approach. E.g. with the npm-browser app [4], I start off using pouchdb-load to pull documents from Amazon S3, then after that's done, I switch to regular replication from a read-only Couch, which is rendered read-only by this very simple design document:
http://skimdb.iriscouch.com/registry/_design/validateNote that the authentication becomes a bit different if you are using Cloudant/Couchbase, because their authentication scheme differs from CouchDB's.
Hope that helps!
- Nolan
[1]:
https://github.com/nolanlawson/pouchdb-authentication#everybody-can-read-only-some-can-write-everything[2]:
https://github.com/nolanlawson/pouchdb-dump-cli[3]:
https://github.com/nolanlawson/pouchdb-load[4]:
http://npm-browser.com