'Is there a javascript/NodeJS client for elastic-search that can be used in React-Native as well

I am developing an app in react-native. I have an elastic-search server up and running in AWS cloud. Right now, It's possible to run queries using Kibana dev tools.

Now I want to query that elastic-search server in react-native mobile app. I want to make API calls to that server. How can I do that ?

I tried using this client https://github.com/elastic/elasticsearch-js but it didn't helped me because client itself was not working in react-native as its showed me many error like http or os cannot be found inside project.

I installed these packages using npm but it still didn't solved the problem.

I want to know what's the right approach for doing this and is it even possible to query elastic-search using this NodeJS client?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source