From 19ef005c581197476fd49c557094c1273ec13ae0 Mon Sep 17 00:00:00 2001 From: Mark Nunberg Date: Thu, 13 Jun 2013 13:38:14 -0700 Subject: [PATCH] Added README.rst --- README.rst | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..b94576a --- /dev/null +++ b/README.rst @@ -0,0 +1,44 @@ +================================= +Couchbase Beer Python Application +================================= + +This is a sample web application written with the Python Couchbase Library. +Currently it relies on the latest patches from gerrit (Specifically, +http://review.couchbase.org/#/c/26856/ and +http://review.couchbase.org/#/c/26934/). + +To test this application, install `Flask` (``pip install flask``). + +The actual Python routing code is found in the ``beer.py`` file. + + +You will need to have the ``beer-sample`` bucket installed. +Additionally, you will need two additional views: + +``beer/by_name``:: + + function(doc, meta) { + if (doc.type && doc.type == "beer") { + emit(doc.name, null); + } + } + + +Here you will need to create a new design document, called +``brewery``. + +``brewery/by_name``:: + + function(doc, meta) { + if (doc.type && doc.type == "brewery") { + emit(doc.name, null); + } + } + + + +To run the webapp, simply do:: + + python beer.py + +And connect to ``localhost:5000``