提交 d8a089a25d80c995e58310b9b94d9f26e4b14d8c

作者 Bruno Bernardino
1 个父辈 2573b1ca

Allowing not requiring redis

I know this is not a big deal and redis will be necessary and required most times.

It turns out I'm working on a very simple app that doesn't require users, auth, thus redis is really not necessary.
正在显示 1 个修改的文件 包含 5 行增加0 行删除
... ... @@ -6,6 +6,11 @@ var RedisStore = require('connect-redis')(session)
6 6
7 7 exports = module.exports = function(logger, settings) {
8 8
  9 + // Allow not needing redis
  10 + if (!settings.redis) {
  11 + return false
  12 + }
  13 +
9 14 var connection = new RedisStore(settings.redis)
10 15
11 16 connection.on('error', function(err) {
... ...
注册登录 后发表评论