CouchDB Proxy Webmachine Resource

Alright, here it is, proof that Webmachine and CouchDB can coexist peacefully: I’ve posted an example Webmachine resource that proxies requests back and forth to a CouchDB instance. (Thanks for the kick, benoitc.)

I dislike the way this blog renders my code, so I’ve decided to start posting my examples on bitbucket, wrapped in a simple Webmachine app, so they’re ready to run. The repo you want is wmexamples.

You’ll find the CouchDB proxy in src/couchdb_proxy.erl.

Watch that repo for other updates. I’ll be going back in the next few days and adding env_resource and some tracing stuff.

Author: Bryan

I'm the creator of Symbology (, BeerRiot (, lots of homebrew, some furniture, and other things. There's more about me at

5 thoughts on “CouchDB Proxy Webmachine Resource”

  1. Can you please explain the use of ibrowse?
    Erlang couchdb clients I saw uses erlang inets.


  2. Hi, pablop. inets would work just as well here. I used ibrowse here because that’s what we use at Basho most of the time, so I’m more familiar with it.

    ibrowse comes packaged with couchdb, but if you want the documentation, you’ll have to download the tarball from

  3. Thank you for your answer.
    From google code it looks like the ibrowse is not very active. I didn’t know it is included in couchdb.

    I’ve just asked justin on twitter about the different files under mywebdemo/src

    A blog post about that will be great.

  4. Hey Bryan,

    Just thought I’d let you know that you can actually embed source files directly from bitbucket into your blog posts. This means that they remain hosted on bitbucket but can still be referenced from your site.

    Check out this simple tutorial for some info.

    Thanks for the Webmachine blogs!

    1. Ooo – very nice. Unfortunately, it looks like my instance strips out script tags. 😛 Thanks for the tip though – it will be useful once I redo things here.

Leave a Reply to pablop Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s