mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00
15 lines
385 B
JavaScript
15 lines
385 B
JavaScript
![]() |
const KeyvRedis = require('@keyv/redis');
|
||
|
|
||
|
const { REDIS_URI } = process.env;
|
||
|
|
||
|
let keyvRedis;
|
||
|
|
||
|
if (REDIS_URI) {
|
||
|
keyvRedis = new KeyvRedis(REDIS_URI, { useRedisSets: false });
|
||
|
keyvRedis.on('error', (err) => console.error('KeyvRedis connection error:', err));
|
||
|
} else {
|
||
|
// console.log('REDIS_URI not provided. Redis module will not be initialized.');
|
||
|
}
|
||
|
|
||
|
module.exports = keyvRedis;
|