From 3c5f3dc09c60bcc852406aee8d591bee989f1933 Mon Sep 17 00:00:00 2001 From: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:30:13 +0530 Subject: [PATCH] Update index.ts --- .../project-factory/src/server/config/index.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utilities/project-factory/src/server/config/index.ts b/utilities/project-factory/src/server/config/index.ts index 4abe1f5f2f7..9c181886dbd 100644 --- a/utilities/project-factory/src/server/config/index.ts +++ b/utilities/project-factory/src/server/config/index.ts @@ -11,9 +11,9 @@ if (!HOST) { } -// const getDBSchemaName = (dbSchema = "") => { -// return dbSchema ? (dbSchema == "egov" ? "public" : dbSchema) : "public"; -// } +const getDBSchemaName = (dbSchema = "") => { + return dbSchema ? (dbSchema == "egov" ? "public" : dbSchema) : "public"; +} // Configuration object containing various environment variables const config = { isCallGenerateWhenDeliveryConditionsDiffer:true, @@ -71,10 +71,10 @@ const config = { DB_NAME: process.env.DB_NAME || "postgres", DB_PASSWORD: process.env.DB_PASSWORD || "postgres", DB_PORT: process.env.DB_PORT || "5432", - DB_CAMPAIGN_DETAILS_TABLE_NAME: `health.eg_cm_campaign_details`, - DB_CAMPAIGN_PROCESS_TABLE_NAME: `health.eg_cm_campaign_process`, - DB_GENERATED_RESOURCE_DETAILS_TABLE_NAME: `health.eg_cm_generated_resource_details`, - DB_RESOURCE_DETAILS_TABLE_NAME: `health.eg_cm_resource_details` + DB_CAMPAIGN_DETAILS_TABLE_NAME: `${getDBSchemaName(process.env.DB_SCHEMA)}.eg_cm_campaign_details`, + DB_CAMPAIGN_PROCESS_TABLE_NAME: `${getDBSchemaName(process.env.DB_SCHEMA)}.eg_cm_campaign_process`, + DB_GENERATED_RESOURCE_DETAILS_TABLE_NAME: `${getDBSchemaName(process.env.DB_SCHEMA)}.eg_cm_generated_resource_details`, + DB_RESOURCE_DETAILS_TABLE_NAME: `${getDBSchemaName(process.env.DB_SCHEMA)}.eg_cm_resource_details` }, // Application configuration app: { @@ -97,7 +97,7 @@ const config = { host: { serverHost: HOST, // Kafka broker host - KAFKA_BROKER_HOST: process.env.KAFKA_BROKER_HOST || "localhost:9092", + KAFKA_BROKER_HOST: process.env.KAFKA_BROKER_HOST || "kafka-v2.kafka-cluster:9092", redisHost: process.env.REDIS_HOST || "localhost", mdms: process.env.EGOV_MDMS_HOST || "https://unified-dev.digit.org/", mdmsV2: process.env.EGOV_MDMS_V2_HOST || "https://unified-dev.digit.org/",