Skip to content

Commit 96079ce

Browse files
authored
Fix: incorrect enviroment variables and env file name (#523)
1 parent 4a20e80 commit 96079ce

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/kafka/nodejs-kafka/README.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ To enable your Node.js application to access a Kafka instance, you must configur
135135
* The generated credentials for your {product-kafka} service account
136136
* The Simple Authentication and Security Layer (SASL) mechanism that the client will use to authenticate with the Kafka instance
137137

138-
In this task, you'll create a new configuration file called `rhoas.env`. In this file, you'll set the required bootstrap server and client credentials as environment variables.
138+
In this task, you'll create a new configuration file called `.env`. In this file, you'll set the required bootstrap server and client credentials as environment variables.
139139

140140
.Prerequisites
141141
ifndef::qs[]
@@ -146,16 +146,16 @@ endif::[]
146146

147147
.Procedure
148148

149-
. In your IDE, create a new file. Save the file with the name `rhoas.env`, at the root level of the `reactive-example` directory for the cloned repository.
149+
. In your IDE, create a new file. Save the file with the name `.env`, at the root level of the `reactive-example` directory for the cloned repository.
150150

151-
. In the `rhoas.env` file, add the lines shown in the example. These lines set the bootstrap server and client credentials as environment variables to be used by the Node.js application.
151+
. In the `.env` file, add the lines shown in the example. These lines set the bootstrap server and client credentials as environment variables to be used by the Node.js application.
152152
+
153-
.Setting environment variables in the rhoas.env file
153+
.Setting environment variables in the .env file
154154
[source,subs="+quotes"]
155155
----
156-
KAFKA_HOST=__<bootstrap_server>__
157-
RHOAS_CLIENT_ID=__<client_id>__
158-
RHOAS_CLIENT_SECRET=__<client_secret>__
156+
KAFKA_BOOTSTRAP_SERVER=__<bootstrap_server>__
157+
KAFKA_CLIENT_ID=__<client_id>__
158+
KAFKA_CLIENT_SECRET=__<client_secret>__
159159
KAFKA_SASL_MECHANISM=plain
160160
----
161161
+
@@ -173,7 +173,7 @@ endif::[]
173173
+
174174
In this case, observe that the Node.js application uses the SASL/PLAIN authentication method (that is, the value of `KAFKA_SASL_MECHANISM` is set to `plain`). This means that the application uses only the client ID and client secret to authenticate with the Kafka instance. The application doesn't require an authentication token.
175175

176-
. Save the `rhoas.env` file.
176+
. Save the `.env` file.
177177

178178
ifdef::qs[]
179179
.Verification
@@ -328,11 +328,11 @@ NOTE: You can also use the {product-long-kafka} web console to browse messages i
328328

329329
. In your IDE, in the `producer-backend` directory of the repository that you cloned, open the `producer.js` file.
330330
+
331-
Observe that the producer component is configured to process environment variables from the `rhoas.env` file that you created. The component used the bootstrap server endpoint and client credentials stored in this file to connect to the Kafka instance.
331+
Observe that the producer component is configured to process environment variables from the `.env` file that you created. The component used the bootstrap server endpoint and client credentials stored in this file to connect to the Kafka instance.
332332

333333
. In the `consumer-backend` directory, open the `consumer.js` file.
334334
+
335-
Observe that the consumer component is also configured to process environment variables from the `rhoas.env` file that you created.
335+
Observe that the consumer component is also configured to process environment variables from the `.env` file that you created.
336336

337337
ifdef::qs[]
338338
.Verification

0 commit comments

Comments
 (0)