I don’t know if I’m just having a rough morning or what, but here’s the situation:
Frustation: .couchapprc is MIA. Maybe it’s supposed to be MIA, maybe I’m supposed to create it. I’m not sure, because there’s nothing in the book indicating as much. Further, since it doesn’t already exists somewhere, I have no idea where to create it. I could guess, but I don’t like guessing. So, since this isn’t mission critical at the moment, I’m going to skip it. Mabe I’ll figure it out later and come back.
Success: I was able to set up my admin account. However, the book says, “You, the author, are the administrator and the only one who can add and edit posts.” Which is cool, but then why am I adding who’s an administrator at the couchdb level? Shouldn’t it be at the tutorial app level? What happens if I have another app that has different admins? Also, the book says, “If you don’t like your passwords lying around in plain-text files, don’t worry. The next time CouchDB starts up and reads this file, it takes your password and changes it to an unreverseengineerable hash.” Which is really super cool, by the way. My only question is: how do I restart couchdb? This may be a case of RTFM, but I haven’t seen it (or remembered seeing it, at least) in my reading so far.
Frustration: I got to the part in Chapter 5 where I ran the following command (replacing admin and ihavenosecrets with the values I’d set previously):
couchapp push . http://admin:ihavenosecrets@127.0.0.1:5984/blogdb
The command line said everything was cool, but this is the response when I went to http://127.0.0.1:5984/blogdb/_list/sofa/index/recent-posts:
{“error”:”not_found”,”reason”:”missing”}
Why, couchdb? Why?
Success: I looked back at the the command line response, as it had spat out some similar yet different-looking URLs. Turns out I really should have gone to this URL instead: http://127.0.0.1:5984/blogdb/_design/sofa/_list/index/recent-posts
Moral of the story? Always rely on the documentation closest to the code first. I think the hierarchy of documentation goes something like this: command line > README > Wiki > Book
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.