| 1234567891011121314 |
- import Redis from "ioredis";
- export const redis = new Redis({
- host: process.env.REDIS_HOST || "localhost",
- port: Number(process.env.REDIS_PORT) || 6379,
- });
- redis.on("connect", () => {
- console.log("Redis Connected");
- });
- redis.on("error", (error) => {
- console.error("Redis connection error:", error);
- });
|