tasko/lib/redis.ts
2025-01-26 00:11:30 -05:00

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;