Created
August 25, 2011 20:57
-
-
Save maacl/1171916 to your computer and use it in GitHub Desktop.
ringerfinger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns rf-test.core | |
(:use (ringfinger core resource fields db auth auth-routes), ringfinger.db.inmem, | |
ringfinger.timesavers.hooks, | |
ring.util.serve)) | |
(make-user inmem :ringfinger_auth {:username "test"} "demo" "salt") | |
(defresource contacts | |
{:db inmem | |
:pk :name_slug | |
:hooks {:data (make-slug-for :name)}} | |
[:name (required) "sorry, anonymous"] | |
[:bday (date-field) "invalid date"] | |
[:email (email-field) "invalid email"]) | |
(defapp myapp | |
{:static-dir "public" | |
:session-db inmem | |
:auth-db inmem} | |
contacts | |
(auth-routes {:db inmem})) | |
(serve myapp 3000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject rf-test "0.0.1-SNAPSHOT" | |
:description "TODO: add summary of your project" | |
:dependencies [[clojure "1.2.0"] | |
[ring "0.3.11"] | |
[ring-serve "0.1.1"] | |
[congomongo "0.1.7-SNAPSHOT"] | |
[ringfinger "0.1.1-SNAPSHOT"]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment