diff --git a/app.coffee b/app.coffee index b86336a3..fa08ce83 100644 --- a/app.coffee +++ b/app.coffee @@ -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') @@ -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) diff --git a/package.json b/package.json index 69aee160..85b25763 100644 --- a/package.json +++ b/package.json @@ -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" } }