CouchApp Development Tools¶
To develop a CouchApp, you will need a way to get your javascript, html and other resources onto your CouchDB instance. Typically this is done with a CouchApp command line tool that maps application assets and CouchDB views, lists, shows, etc into one or more Design Documents.
- The CouchApp Filesystem Mapping -
couchapp.py
and erica (mentioned below) implement a consistent filesystem-to-design-document mapping
Note
The original CouchApp command line tools were created in 2008 / 2009 by
@benoitc and @jchris. They still work, and have been feature complete
for a long time. couchapp
has been replaced and is compatible with the
old couchapp
tool.
cURL¶
The simplest way to develop a couchapp would be to use curl
from the
command line.
CouchApp command line tool¶
The CouchApp command line tool is used to generate code templates in your application and to push your changes to an instance of CouchDB, among other things. Here is how to get started with the CouchApp command line tool:
- Installing couchapp
- Couchapp configuration
- The couchapp command line tool
- Extending the couchapp command line tool
- Using couchapp with multiple design documents
Note
There can be confusion with the term CouchApp because it can refer to
this tool, named CouchApp, or a general application served from
CouchDB. This is probably due to the fact that the CouchApp command line
tool, as known as couchapp.py
, was the first full way of developing a
CouchApp.
node.couchapp.js¶
This is an alternative tooling to the Python couchapp utility that is instead written in Node.js. It uses a much simpler folder structure than it’s Python counterpart and is a generally more minimalist/simplified way of writing couchapps. Note that you cannot use Python couchapp to push couchapps written using node.couchapp.js into CouchDB and vice versa.
erica¶
erica is an Erlang-based command line tool that is compatible with the Python and Node.js CouchApp tools.
Kanso¶
A comprehensive, framework-agnostic build tool for CouchApps.
The Kanso command line tool can build projects designed for
node.couchapp.js, or even the Python couchapp tool, while providing many
other options for building your app. These build steps and other code
can be shared using the online package
repository. Compiling coffee-script, .less
CSS templates etc. is as easy as including the relevant package.
NPM for CouchApps¶
Kanso also lets you merge design docs together, which allows reusable components built with any of the available couchapp tools. The Kanso tool can help you manage dependencies and share code between projects, as well as providing a library of JavaScript modules for use with CouchDB.
soca¶
soca is a command line tool written in ruby for building and pushing couchapps. It is similar to the canonical couchapp python tool, with a number of key differences:
- local directories do not have to map 1-1 to the design docs directory
- lifecycle management & deployment hooks for easily adding or modifying the design document with ruby tools or plugins.
- architected around using Sammy.js, instead of Evently, which is bundled with the python tool. Sammy.js is a Sinatra inspired browser-side RESTframework which is used by default.
Unlike a traditional couchapp, a soca couchapp is one way - your source
directory structure is actually ‘compiled’ into into the couchapp
_design
document format.
Compile time plugins:
- Compass
- CoffeeScript
- Mustache
- JavaScript bundling for CouchDB and the browser
Reupholster¶
Reupholster is geared for CouchApp beginners and simple CouchApps. What Reupholster does is allows you to experience writing a CouchApp as fast as possible, with very little learning curve. It just feels like you are editing a normal web project.