diff --git a/package.json b/package.json index 7da43e2..42287e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wms-core", - "version": "0.4.18", + "version": "0.4.19", "description": "Node web framework", "repository": "git@gitlab.com:ArisuOngaku/wms-core.git", "author": "Alice Gaudon ", diff --git a/src/components/RedisComponent.ts b/src/components/RedisComponent.ts index 06e7030..14855c9 100644 --- a/src/components/RedisComponent.ts +++ b/src/components/RedisComponent.ts @@ -13,14 +13,15 @@ export default class RedisComponent extends ApplicationComponent { private store?: Store; public async start(app: Express, router: Router): Promise { - this.redisClient = redis.createClient(config.get('redis.port'), config.get('redis.host'), {}); + this.redisClient = redis.createClient(config.get('redis.port'), config.get('redis.host'), { + password: config.has('redis.password') ? config.get('redis.password') : undefined, + }); this.redisClient.on('error', (err: any) => { Logger.error(err, 'An error occurred with redis.'); }); this.store = new RedisStore({ client: this.redisClient, prefix: config.get('redis.prefix') + '-session:', - pass: config.has('redis.password') ? config.get('redis.password') : undefined, }); }