⬅️ Reverted changes

This commit is contained in:
2024-05-15 11:47:08 -05:00
parent 323548c0ff
commit 4680fd0875
2 changed files with 3 additions and 3 deletions

View File

@@ -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);
});

View File

@@ -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