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