Permalink
Browse files

add Mongo example

  • Loading branch information...
1 parent f4caf9a commit 2519e820ac499861b57598e4e1d6e92f18ee9d16 freeformz committed Nov 9, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 README
View
@@ -35,6 +35,17 @@ An explicit version of example 2, minus the default developer landing page:
use CloudKit::Service, :collections => [:notes, :todos]
run lambda {|env| [200, {'Content-Type' => 'text/html', 'Content-Length' => '5'}, ['HELLO']]}
+The same as above, using MongoDB:
+
+ require 'cloudkit'
+ CloudKit.setup_storage_adapter( CloudKit::MongoStore.new( { :hosts => [ ["localhost", 27017] ] } ) )
+ use Rack::Session::Pool
+ use CloudKit::OAuthFilter
+ use CloudKit::OpenIDFilter
+ use CloudKit::Service, :collections => [:notes, :todos]
+ run lambda {|env| [200, {'Content-Type' => 'text/html', 'Content-Length' => '5'}, ['HELLO']]}
+
+
The same as above, using Tokyo Cabinet:
require 'cloudkit'

0 comments on commit 2519e82

Please sign in to comment.