I would suggest it’s a bad assumption to make about starting from the example 
app. In my case, since all the sample apps are built assuming sync gateway it 
didn’t answer that question for me.


Also I’m not sure I expressed that very well, I didn’t mean “talking directly 
to the server”.


Thanks for all the info, esp the URL-generation info, that’s great to know.


_peter


> On Oct 2, 2014, at 4:27 PM, Jens Alfke <[email protected]> wrote:
> 
> 
>> 
>> On Oct 2, 2014, at 11:25 AM, Peter Jacobson <[email protected]
>>> wrote:
>> 
>> "Are you talking about the base URL to use with PhoneGap? That’s the same 
>> whether or not you use sync”
>> 
>> 
>> I would have thought there would be some canonical localhost-type URL to 
>> talk to a local vs a remote couchbase daemon.
>> 
>> 
> 
> No, you never talk directly to a server. Only the replicator does that. (As 
> you probably by now realize.)
> 
>> I didn’t realize there isn’t one and that you have to get it from the 
>> plugin, so I spent several hours assuming I had a bad URL (in part because 
>> of the 400 error message) and trying different URLs (e.g. couchdb 
>> useshttp://0.0.0.0:5984
>> ). Some clearer indication of that in the docs would be a big help - I 
>> couldn’t find anything that specified this.
>> 
>> 
> 
> I think this isn't documented because we assume devs will start from a 
> PhoneGap example project and build the app from there, instead of trying to 
> start from scratch with just the PhoneGap plugin. (But I don't work on our 
> PhoneGap integration so I shouldn't speculate too much.)
> 
> 
> FYI, the reason for the different URLs is that while iOS uses a URL-protocol 
> plugin to catch the request before it hits the wire, you apparently can't do 
> that on Android; so the Android version has to open a real live TCP listener 
> socket. That socket will end up with an effectively-random port number, so 
> the URL can't be hardcoded.
> 
> 
> —Jens
> 
> --
> You received this message because you are subscribed to a topic in the Google 
> Groups "Couchbase Mobile" group.
> To unsubscribe from this topic, 
> visithttps://groups.google.com/d/topic/mobile-couchbase/VwKv2PpF1Pw/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email 
> [email protected]
> .
> To view this discussion on the web 
> visithttps://groups.google.com/d/msgid/mobile-couchbase/E3D87489-9038-4B0C-9441-6BEDC06B5F52%40couchbase.com
> .
> For more options, visithttps://groups.google.com/d/optout
> .

-- 
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/94D530DE-111E-4EE5-9F9A-2595A86DA947%40surgeforward.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to