Created
April 19, 2010 03:58
-
-
Save weavejester/370734 to your computer and use it in GitHub Desktop.
This file contains 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 hello-world.core | |
(:use compojure.core | |
ring.middleware.session | |
ring.adapter.jetty)) | |
(defroutes app | |
(GET "/set-session" [] | |
{:body "set session" | |
:session {:a-key "a value"}}) | |
(GET "/read-session" {s :session} | |
{:body (str "session: " s)})) | |
(wrap! app :session) | |
(run-jetty app {:port 8080}) |
This file contains 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 hello-world "1.0.0-SNAPSHOT" | |
:description "FIXME: write" | |
:dependencies [[org.clojure/clojure "1.1.0"] | |
[org.clojure/clojure-contrib "1.1.0"] | |
[compojure "0.4.0-SNAPSHOT"] | |
[ring/ring-jetty-adapter "0.2.0"]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment