I've been doing some further testing. I wanted to try to see if I could get
any connection to the server at all, so I added:

var server = coax( url )
server.get( function( err, res ) {
  if( err ) {
    alert( "bg:" + err )
  }
  alert( "gs:" + res )
} )

This returned: "bg:Syntax error: Unexpected end of input", the same as the
put. To check if I could access it directly, I tried:

var xmlHttp = new XMLHttpRequest()
xmlHttp.open( 'GET', url, false )
xmlHttp.send( null )
alert( 'XMLHttpRequest get: ' +  xmlHttp.responseText )

This returns an ok status and welcome message. The coax methods which
followed this now perform differently.

The get returns the same welcome message and the put to create the database
now returns a HTTP 412: Precondition Failed meaning that one of the request
headers couldn't be satisfied.

I'll keep digging…

-Will

On Sun, May 18, 2014 at 7:53 AM, Will Holcomb <[email protected]> wrote:

> I was able to get the ToDo working. I tried using coax to access my db:
>
> cblite.getURL( function( err, url ) {
>   var coax = require( 'coax' )
>   var db = coax( [url, 'wells'] )
>
>   db.put( function( err, res ) {
>     if( err ) {
>       alert( "ip:" + err )
>     }
>     ⋮
>
> This prints: "ip:Syntax error: Unexpected end of input". Creating a
> database like this is pretty much verbatim from the example; very
> frustrating…
>
> -Will
>
> On Friday, May 16, 2014 10:57:37 PM UTC-4, J. Chris Anderson wrote:
>>
>> There is a similar discussion going on here: https://github.com/
>> couchbaselabs/TodoLite-PhoneGap/issues/5
>>
>> Are you able to get the TodoLite example app to work? It works for me,
>> but I'm not a very large sample set...
>>
>> Chris
>>
>

-- 
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/CAB8ffCAKw8kuZnvNpRXDZo_fCH%2BJAm6Cdd676of%3DAMWMPz2MrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to