Sorry about the delated reply. You shouldn't need coax (it's just a URL 
munger around XHR so it doesn't matter how you create your URLs). You might 
look at existing CouchDB Backbone libraries for examples of connecting to 
the _changes feed.

That 502 response doesn't make any sense to me. Are you on iOS or Android?

Chris

On Wednesday, October 9, 2013 2:43:44 PM UTC-7, Georges Gabereau wrote:
>
> Hey all,
>
> I'm going through the process of creating a simple CBLite app in PhoneGap 
> using the plugin.
>
> I have an app that uses Backbone and I'd like to write a Backbone.sync 
> that works seamlessly with CBLite. I think there might be a lot of people 
> that could benefit from this. All the examples use coax and I've never used 
> that, so I'm not totally clear on how required it is to speak to CBLite.
>
> I am trying to do all my interactions through $.ajax as provided by Zepto 
> or jQuery.
>
> Here's a quick little Gist that shows my uber basic test ajax call to 
> CBLite in PhoneGap:
>
> https://gist.github.com/multiplegeorges/0d6352d69d7d3706115c
>
> Here are some URLs I hit (in order) and the responses I got:
>
> *PUT http://lite.couchbase./test_db <http://lite.couchbase./test_db>*
> response: {"ok": true}
>
> *GET http://lite.couchbase./test_db <http://lite.couchbase./test_db>*
> response: {"db_name": "test_db", "doc_count": 0.... etc
>
> *PUT http://lite.couchbase./test_db/123 
> <http://lite.couchbase./test_db/123>*
> Params: {"first_name": "georges"}
> response: {"status": 502, "error":"Invalid response from remote 
> replication server"}
>
> *GET http://lite.couchbase./test/123 <http://lite.couchbase./test/123>*
> response: 404 !
>
> So, what setting am I missing here? 
> I thought that I could use CBLite as a local storage mechanism even if 
> remote replication wasn't set up.
>
> Thanks,
>
> Georges
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/c71ba934-60d4-4fb0-a8dc-d1971ad2614a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to