couchdbcouchapp

Is there a simpler Couchapp than Couchapp?


Specifically, I am finding "evently" to be a bit of a hurdle to getting started with Couchapp. I really like the idea of an App served from CouchDB, but I want to get started without having to figure out "evently" ( which looks very interesting, like something I would want to investigate, but not right now ). I just want to make a simple CouchDB App using my existing javascript skills and my new CouchDB knowlege. Is there a simpler CouchApp than CouchApp? Or can I make it simpler? Or should I just drink the kool-aid and learn the "evently" stuff?

EDIT(3 months later):

Thanks everyone for the answers -- here's what I have figured out:

You can easily use the core features of CouchApp without drinking anyone's Kool-Aid. Specifically, "evently" is absolutely not required for serving an app from CouchDB. The core goodness of CouchApp is simply the "push" function, where it builds your "design doc" from files and folders -- all the rest seems to be a whole javascript framework that you don't have to use.

Once you get past the hurdle of figuring out how to actually serve pages and javascript from CouchDB, you can build your app any way you like. It only requires simple AJAX to get documents and save documents, so the possibilities are endless!


Solution

  • You can use the _attachments folder as the document root of your application. For example, if the contents of _id is _design/testapp and .couchapprc is:

    {
      "env": {
        "default": {
          "db": "http://USERNAME:PASSWORD@localhost:5984/testdb"
        }
      }
    }
    

    then the file _attachments/index.html is at http://localhost:5984/testdb/_design/testapp/index.html.

    You can then use jQuery to build your app, doing queries whith getJSON. Or you can use the included wrappers loaded from vendor/couchapp/_attachments/loader.js.

    You can also serve dynamic html using show or list functions.