Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sritchie/couch-session

CouchDB Sessions for Ring.
https://github.com/sritchie/couch-session

Last synced: 24 days ago
JSON representation

CouchDB Sessions for Ring.

Awesome Lists containing this project

README

        

Relax!
======

`couch-session` lets you use CouchDB as Clojure/Ring's HTTP session
storage engine.

Installation
============

Add:

```clojure
[couch-session "1.1.1"]
```

to dependencies in your `project.clj`.

Usage
=====

`couch-session` is a drop-in replacement for Ring's native session store:

```clojure
(ns hello
(:use [couch-session.core :only (couch-store)]
[com.ashafa.clutch :only (get-database)])

(def store
(get-database (assoc (com.ashafa.clutch.utils/url "sessions")
:username "username"
:password "password")))

(def app
(-> ...
... other middleware ...
(wrap-session {:store (couch-store store)})
....))
```

License
=======

Copyright (C) 2011 Sam Ritchie

Distributed under the Eclipse Public License, the same as Clojure.