Skip to content

Instantly share code, notes, and snippets.

@sirn
Created November 11, 2010 21:02
Show Gist options
  • Save sirn/673174 to your computer and use it in GitHub Desktop.
Save sirn/673174 to your computer and use it in GitHub Desktop.
(ns ringcookie.core
(:use ring.adapter.jetty
ring.middleware.cookies
ring.middleware.session
ring.middleware.session.cookie))
(defn app
[req]
{:status 200
:cookies {:test-cookie "foobar"}
:session {:test-session "foobar"}})
(def site
(-> app
(wrap-session {:store (cookie-store)})
wrap-cookies))
(defn start-server
[] (run-jetty #'site {:port 8080 :join? false}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment