mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 15:28:25 +00:00
17 lines
396 B
TypeScript
17 lines
396 B
TypeScript
import Redis, { Redis as TRedis } from "ioredis";
|
|
import { logger } from "../utils/logging";
|
|
|
|
let redisClient: TRedis | null;
|
|
|
|
export const initRedis = async () => {
|
|
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 };
|