Skip to content

Commit

Permalink
Use redis for session store
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Soltys committed Dec 7, 2012
1 parent d37bc94 commit 5d56b2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ sessions = require("./routes/sessions")(passport)
transactions = require("./routes/transactions")
users = require("./routes/users")

RedisStore = require('connect-redis')(express)
sessionStore = new RedisStore()

app = express()
app.enable('trust proxy')
Expand All @@ -18,7 +20,7 @@ app.use(express.static(__dirname + '/public'))
app.use(require('connect-assets')(src: 'public'))
app.use(express.bodyParser())
app.use(express.cookieParser())
app.use(express.session(secret: 'weareallmadeofstars'))
app.use(express.session(secret: 'weareallmadeofstars', store: sessionStore, key: 'vanbtc.sid'))
app.use(passport.initialize())
app.use(passport.session())
app.use(app.router)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"passport": "0.1.15",
"passport-local": "0.1.6",
"bcrypt": "0.7.3",
"mmm": "0.2.1"
"mmm": "0.2.1",
"connect-redis", "1.4.5"
}
}

0 comments on commit 5d56b2e

Please sign in to comment.