couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "CouchIn15Minutes" by BenjaminYoung
Date Wed, 12 Aug 2009 23:12:05 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by BenjaminYoung:
http://wiki.apache.org/couchdb/CouchIn15Minutes

The comment on the change is:
added some headers partly for linking to sections directly

------------------------------------------------------------------------------
  
  (Tested with 0.9.0 on [http://www.ubuntu/org' Ubuntu], wikified from my [http://www.jroller.com/robertburrelldonkin/entry/couchdb_in_15_minutes
blog])
  
+ == Install (very basic) ==
  1. [http://couchdb.apache.org/downloads.html Download], unpackage and cd to the directory
   1. Read the README then follow the instructions (for Unbuntu, use [http://dbpedia.org/page/Debian
Debian])
   1. (Ubuntu) Remember to apt-get the require libraries before building
   1. Start Couch from the command line and check everything looks good
+ 
+ == Create a new Database ==
  1. Create new database
   1. Browse http://localhost:5984/_utils/
   1. Click "Create Database"
   1. Enter "example"
+ 
+ == "Hello, World!" (of course) ==
  1. Now for "Hello, World!"
   1. Couch is RESTful so you'll need a HTTP client. These instructions are for telnet (those
who dislike the command line could use [http://localhost:5984/_utils/database.html?example/_design_docs
futon]).
   1. Type: {{{$ telnet localhost 5984}}}
@@ -38, +43 @@

  Connection closed by foreign host.}}}
   1. Browse http://localhost:5984/example/some_doc_id to see {{{
  {"_id":"some_doc_id","_rev":"1-518824332","greetings":"Hello, World!"} }}}
+ 
+ == Document creation recap ==
  1.Huh?
   1. Couch is a RESTful so to create a document PUT (as above) or POST
   1. Couch uses a JSON API. So PUT a document as JSON and GET results as JSON
   1. To view the data, use a view (Doh!)
   1. Each document has a unique "_id"
   1. Each document is versioned with a "_rev"
+ 
+ == Create a View and...view it ==
  1. Relax and take a look at the view
   1. (Well, actually I'm going to use a "show" but it'll demonstrate the flavour)
   1. Again {{{
@@ -68, +77 @@

  {"ok":true,"id":"_design/render","rev":"1-2041852709"}
  Connection closed by foreign host. }}}
   1. Browse http://localhost:5984/example/_design/render/_show/salute/some_doc_id
+ 
+ == Summary of what a View is and does ==
  1. What Just Happened?
   1. A "show" directly renders a document using JavaScript
   1. "Shows" are added to a design document (in this case "/_design/render" via the "shows"
property)

Mime
View raw message