From 4680fd0875b737006224a4c51453cd12ab259701 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 15 May 2024 11:47:08 -0500 Subject: [PATCH] =?UTF-8?q?=E2=AC=85=EF=B8=8F=20Reverted=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/redis.config.ts | 4 ++-- moleculer.config.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/redis.config.ts b/config/redis.config.ts index 26a4cb8..df743ae 100644 --- a/config/redis.config.ts +++ b/config/redis.config.ts @@ -2,7 +2,7 @@ import { createClient } from "redis"; import { URL } from "url"; // Ensure that the REDIS_URI environment variable is set -const redisURL = process.env.REDIS_URI ? new URL(process.env.REDIS_URI) : null; +const redisURL = process.env.REDIS_URI; if (!redisURL) { throw new Error("REDIS_URI environment variable is not set."); } @@ -10,7 +10,7 @@ if (!redisURL) { // Function to create a Redis client const createRedisClient = (url) => { const client = createClient({ url }); - + console.log(client) client.on("error", (err) => { console.error("Redis Client Error", err); }); diff --git a/moleculer.config.ts b/moleculer.config.ts index b6e15d1..69e2ce2 100644 --- a/moleculer.config.ts +++ b/moleculer.config.ts @@ -90,7 +90,7 @@ const brokerConfig: BrokerOptions = { // More info: https://moleculer.services/docs/0.14/networking.html // Note: During the development, you don't need to define it because all services will be loaded locally. // In production you can set it via `TRANSPORTER=nats://localhost:4222` environment variable. - transporter: process.env.REDIS_URI || "redis://127.0.0.1:6379", + transporter: process.env.REDIS_URI || "redis://localhost:6379", // Define a cacher. // More info: https://moleculer.services/docs/0.14/caching.html