Elias
Elias

Reputation: 199

elasticsearch client cant be use in vue.js, because of no nodejs environment

I tried to use elasticsearch client in vue.js. But elasticseach needs to be in a node.js environment. Vue.js doesn't have node.js environment. Is there any other solution? https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html

Upvotes: 0

Views: 419

Answers (1)

Denis Kohl
Denis Kohl

Reputation: 750

You have to create a rest api an server site. This Node.js porgramm will create the Connection to elasticsearch Server.

Your vue.js Client Connect you Rest api by ajax call. You Node.js Programm call elasticesearch.

Upvotes: 2

Related Questions