Skip to content

Instantly share code, notes, and snippets.

@weavejester
Created April 19, 2010 03:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weavejester/370734 to your computer and use it in GitHub Desktop.
Save weavejester/370734 to your computer and use it in GitHub Desktop.
(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})
(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