import redis from 'redis';
import { logger } from './logger.js';

const { REDIS_HOST, REDIS_PORT } = process.env;

if (!REDIS_HOST || !REDIS_PORT) {
    logger.error('REDIS_HOST and REDIS_PORT must be set')
    process.exit(1)
}

export const redisClient = redis.createClient({
    url: `redis://${REDIS_HOST}:${REDIS_PORT}`
});

