couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <...@iriscouch.com>
Subject CouchDB plugin examples
Date Sat, 24 Nov 2012 06:00:47 GMT
In the spirit of re├źnergizing Futon, I open-sourced a plugin we use at
Iris Couch, futon_couchdb.

https://github.com/iriscouch/futon_couchdb

This plugin makes /_utils dynamic, serving any of

* Mobile Futon if you are mobile (I know, user-agent sniffing is out of vogue)
* Sammy Futon if you configure it, or use the Easter egg
* Normal Futon

The code and even the feature are quite bad. However it is an
excellent example of how to make a CouchDB plugin. The entire project
is 25 commits, and if you read the changes, you can learn many things:

* Making a minimal Rebar (Erlang) project
* Building such a project, "linking" against CouchDB.
* Integrating the plugin (an http handler) into CouchDB
* Supporting custom configuration options, and defining their defaults
* Using files from a plugin-local private directory

So if you are interested in CouchDB development, maybe it will help
you get your feet wet.

A more advanced example is pingquery_couchdb, with which the Erlang
part of CouchDB "pings" the JavaScript part, and verifies the
response.

https://github.com/iriscouch/pingquery_couchdb

-- 
Iris Couch

Mime
View raw message