Skip to content

Commit

Permalink
fix: change env vars
Browse files Browse the repository at this point in the history
change process.env.ID to process.env.HTTP_CHECK_ID
  • Loading branch information
karanwadhwa authored and sydrawat01 committed Nov 23, 2023
1 parent df460cc commit 4ac5ca1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions config/app.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
import 'dotenv/config'

const { BROKER_0, BROKER_1, BROKER_2, CLIENT_ID, TOPIC, URL, NAME, RETRIES } =
process.env
const {
BROKER_0,
BROKER_1,
BROKER_2,
CLIENT_ID,
TOPIC,
URL,
NAME,
RETRIES,
HTTP_CHECK_ID,
} = process.env
const producerConfig = {
BROKER_0,
BROKER_1,
BROKER_2,
CLIENT_ID,
TOPIC,
ID,
URL,
NAME,
RETRIES,
HTTP_CHECK_ID,
}

export default producerConfig
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
URL,
NAME,
RETRIES,
ID,
HTTP_CHECK_ID,
} = producerConfig
const topic = TOPIC
const brokers = [BROKER_0, BROKER_1, BROKER_2]
Expand All @@ -29,7 +29,7 @@ const init = async () => {
const response = await fetch(URL)
const status = await response.status
const data = {
http_check_id: ID,
http_check_id: HTTP_CHECK_ID,
name: NAME,
uri: URL,
num_retries: RETRIES,
Expand Down

0 comments on commit 4ac5ca1

Please sign in to comment.