Monday 8 July 2013

CouchDB Sinatra REST bare-metal call test application

Some months ago I was involved in configuring an API to use with CouchDB. In the process of this, I created a test application using Sinatra to utilize the various CouchDB REST calls. This is that application.

Later I created a MUCH more sophisticated set of sub-apps in Padrino to utilize the lessons learned. For some time now I have been asked to release it into the wild to aid other developers, but have been too busy. Now I have time. Hence this post.

It is not great. It is not well written. It is not documented. It has no tests. But it works.

It was written in one day to get the process of using rest-client to operate against a test CouchDB database. That is all.

I make no apologies for the code.

It works. That is all.

To use it:

1) Install CouchDB someplace.

I have it on an external server as exampled in the config/couchdb.yml file.

2) Clone the repo from

Goes without saying...

3) Change the config/couchdb.yml file

Change to suit.

4) Fire it up

bundle install
rackup -s thin -o -p 9292 -E development

Then open a browser to and start playing.


I would love to here from cloners who would like enhancements as I'm always ready to learn. If you see a problem, or want to have me change something, tell me.

No comments:

Post a Comment