Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move session-storage to mongodb

  • Loading branch information...
commit 1249c6d39371a7478cae43d1675db17397dd98c6 1 parent 74a88e7
@amalloy amalloy authored
Showing with 4 additions and 2 deletions.
  1. +1 −0  project.clj
  2. +3 −2 src/foreclojure/core.clj
View
1  project.clj
@@ -11,6 +11,7 @@
[cheshire "2.0.2"]
[useful "0.7.0-beta5"]
[amalloy/ring-gzip-middleware "[0.1.0,)"]
+ [amalloy/mongo-session "0.0.1"]
[clj-github "1.0.1"]
[ring "0.3.7"]
[clj-config "0.1.0"]
View
5 src/foreclojure/core.clj
@@ -25,7 +25,8 @@
[ring.middleware.reload :only [wrap-reload]]
[ring.middleware.stacktrace :only [wrap-stacktrace]]
[ring.middleware.file-info :only [wrap-file-info]]
- [ring.middleware.gzip :only [wrap-gzip]]))
+ [ring.middleware.gzip :only [wrap-gzip]]
+ [mongo-session.core :only [mongo-session]]))
(def *block-server* false)
@@ -52,7 +53,7 @@
((if (:wrap-reload config)
#(wrap-reload % '(foreclojure.core))
identity))
- session/wrap-stateful-session
+ (session/wrap-stateful-session {:store (mongo-session :sessions)})
wrap-request-bindings
handler/site
wrap-strip-trailing-slash))
Please sign in to comment.
Something went wrong with that request. Please try again.