PouchDB and Sync Gateway

497 views
Skip to first unread message

Paul Capestany

unread,
Jul 19, 2013, 3:35:36 PM7/19/13
to mobile-c...@googlegroups.com
I just recently started playing around with PouchDB and was wondering if anyone else on this list has tried using sync_gateway to replicate against it?

For me, it was pretty painless to get the following syncing setup working (with the PouchDB todo demo web app):

PouchDB ⇆ CouchDB ⇆ Sync Gateway ⇆ Couchbase Server

However, what I thought I'd be able to do was directly sync PouchDB without needing a CouchDB intermediary, like so:

PouchDB ⇆ Sync Gateway ⇆ Couchbase Server

Alas, that approach didn't work for me — when I tried to replicate directly against sync_gateway, all it logged was a HTTP: OPTIONS /todos/ request when the web app first loaded. My wild guess would be that it may be related to the CORS setup required to get things working with a CouchDB instance, but I have no idea. Would be great to hear from anyone else who's experimenting with PouchDB + Sync Gateway!


J. Chris Anderson

unread,
Jul 23, 2013, 1:45:05 PM7/23/13
to mobile-c...@googlegroups.com
I've used them before like this, but in a PhoneGap context where I could turn of the origin security stuff. Maybe we need to close this ticket for your use case? https://github.com/couchbaselabs/sync_gateway/issues/115 please add a comment if this sounds right

 

Paul Capestany

unread,
Jul 23, 2013, 2:16:53 PM7/23/13
to mobile-c...@googlegroups.com
Ha, somehow I never saw that ticket... but yup, it looks like the same issue. Added my comment to it — thanks!

Giovanni Degiorgi

unread,
Sep 19, 2013, 4:49:28 AM9/19/13
to mobile-c...@googlegroups.com
Hi there,

I'm also trying to make PouchDB sync against a sync_gateway server in front of a couchbase server, unfortunately isn't working too.

Is there any update to that problem?

Cheers
Gio
Reply all
Reply to author
Forward
0 new messages