mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 05:28:23 +00:00
14 lines
342 B
TypeScript
14 lines
342 B
TypeScript
import Redis, { Redis as TRedis } from "ioredis";
|
|
import { logger } from "../utils/logging";
|
|
|
|
let redisClient: TRedis | null;
|
|
|
|
if (process.env.REDIS_URL) {
|
|
redisClient = new Redis(process.env.REDIS_URL as string);
|
|
} else {
|
|
logger.warn("Redis URL not set, skipping Redis initialization.");
|
|
redisClient = null;
|
|
}
|
|
|
|
export { redisClient };
|