Create a new directory anywhere you’d like for this project:

mkdir kafka-nodejs-getting-started && cd kafka-nodejs-getting-started

Then install the Apache Kafka JS client library:

npm install kafkajs