mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
14 lines
210 B
TypeScript
14 lines
210 B
TypeScript
|
import Redis from 'ioredis';
|
||
|
|
||
|
let redis;
|
||
|
|
||
|
if (!redis) {
|
||
|
redis = new Redis(process.env.REDIS_URL);
|
||
|
|
||
|
redis.on('error', (err) => {
|
||
|
console.error('Redis Client Error:', err);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
export default redis;
|