Fix bad place of use for redis pass
This commit is contained in:
parent
6868411aa7
commit
fc5344c629
@ -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 <alice@gaudon.pro>",
|
||||
|
@ -13,14 +13,15 @@ export default class RedisComponent extends ApplicationComponent<void> {
|
||||
private store?: Store;
|
||||
|
||||
public async start(app: Express, router: Router): Promise<void> {
|
||||
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<string>('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<string>('redis.prefix') + '-session:',
|
||||
pass: config.has('redis.password') ? config.get<string>('redis.password') : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user