const session = require("express-session") const config = require("../config") var RedisStore = require('connect-redis')(session); var sess = { secret: config.session.secret, store: new RedisStore(config.redis), cookie: {}, resave: false, saveUninitialized: true, } sess.cookie.secure = config.session.secure module.exports = session(sess)