Thanks Jens.  Really appreciate the help.

It is a new app and I can confirm that db.put is being called using the 
code from the sample.  

    function setupDb(db, cb) {
        logMessage("setupDb");
        db.get(function(err, res, body){
            logMessage(JSON.stringify(["db put - err:", err]))
            logMessage(JSON.stringify(["db put - res:", res]))
            logMessage(JSON.stringify(["db put - body:", body]))
            db.put(function(err, res, body){
                logMessage("setupDb - db.put");
                db.get(cb)
            })
        })

I also looked at the iOS simulator image through my filesystem and a cblite 
for todo is also being created which makes me think that the call is 
successful.  Any other suggestions?

Mike

On Sunday, September 14, 2014 4:10:15 PM UTC-4, Jens Alfke wrote:
>
>
> > On Sep 14, 2014, at 8:07 AM, Mike Kirkup <[email protected] 
> <javascript:>> wrote: 
> > 
> >             var url = "http://lite.couchbase./todo";; 
> … 
> > For some reason, the code above returns a 404 error with no status text 
> every single time. 
>
> Assuming this is a new app, did you create the 'todo' database first? It 
> won't exist until you do a PUT to its URL. The usual idiom is to do the PUT 
> first thing on every launch, and ignore a 412 error (that just means the 
> database already exists.) 
>
> —Jens 
>
>

-- 
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/9eb4b547-d66d-4601-b8f9-f71919d6ee7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to