incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajkumar S <>
Subject Updating a design doc using curl
Date Fri, 06 Feb 2009 09:41:42 GMT

I have a design doc by name score_list which I edit using my normal
editor and use curl to upload it to couch.

curl -X PUT "http://myserver:5984/mydb/_design%2Fscore_list" -H
"Content-Type: application/json" -T score_list.js


After every update I manually copy the rev: from the curl output to
the score_list.js.
    "_id": "_design/score_list",
    "_rev": "528497097",
    "language": "javascript",
    "views": {
        "score_list": {
            "map": "function(doc) {\n  emit(null, doc);\n}"

This is pretty tedious and error prone and I would like to just update
the design doc and not worry about having correct _rev. Is that
possible? Is there a recommended work flow for editing and updating
design docs?

with regards,


View raw message