How to use Elasticsearch in Javascript: code repository This is the code of the blog post from Elastic Labs How to use Elasticsearch in JavaScript. setup environment variables rename the .env.example file to .env and set the variables in it. install the dependencies npm install run the code npm run start run the tests npm run test