Permalink
Browse files

Add Tokyo Tyrant example

  • Loading branch information...
1 parent 80385d4 commit eeb497cfbf5e0a084091c08ea749419894a6bc3d @jcrosby committed Mar 24, 2009
Showing with 14 additions and 1 deletion.
  1. +11 −0 examples/6.ru
  2. +3 −1 examples/TOC
View
@@ -0,0 +1,11 @@
+$:.unshift File.expand_path(File.dirname(__FILE__)) + '/../lib'
+require 'cloudkit'
+require 'rufus/tokyo/tyrant' # gem install rufus-tokyo
+# start Tokyo Tyrant with a table store...
+# ttserver data.tct
+CloudKit.setup_storage_adapter(Rufus::Tokyo::TyrantTable.new('127.0.0.1', 1978))
+use Rack::Session::Pool
+use CloudKit::OAuthFilter
+use CloudKit::OpenIDFilter
+use CloudKit::Service, :collections => [:notes]
+run lambda{|env| [200, {'Content-Type' => 'text/html', 'Content-Length' => '5'}, ['HELLO']]}
View
@@ -4,7 +4,7 @@ Index of Examples
When using the gem version of CloudKit, the first line of each example can be
removed.
-1. Expose Notes - Mount a JSON "notes" API. Uses in-memory SQLite.
+1. Expose Notes - Mount a JSON "notes" API. Uses in-memory store.
2. Contain Notes - Same as #1, adding OpenID and OAuth.
@@ -13,3 +13,5 @@ removed.
4. Notes with OAuth - Same as #1 using only OAuth.
5. Tokyo Notes - Same as #2 with a Tokyo Cabinet Table store.
+
+6. Tyrant Notes - Same as #2 with a Tokyo Tyrant Table store.

0 comments on commit eeb497c

Please sign in to comment.