redis conf

This commit is contained in:
Evert Prants 2022-11-27 16:38:21 +02:00
parent d9adcb2fa9
commit e8eabda26f
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -14,7 +14,9 @@ import { config } from './config';
import { Game } from './object/game'; import { Game } from './object/game';
const RedisStore = connectRedis(session); const RedisStore = connectRedis(session);
const redisClient = config.redis?.enabled ? redis.createClient() : undefined; const redisClient = config.redis?.enabled ? redis.createClient({
url: config.redis?.url || 'redis://localhost:6379',
}) : undefined;
const sessionMiddleware = session({ const sessionMiddleware = session({
secret: config.server.sessionSecret, secret: config.server.sessionSecret,