elasticsearch npm
npm install @elastic/elasticsearch
elasticsearch npm
npm install @elastic/elasticsearch
elasticsearch test node.js
npm install @elastic/elasticsearch-mock --save-dev
elasticsearch test node.js
const { Client } = require('@elastic/elasticsearch')
const Mock = require('@elastic/elasticsearch-mock')
const mock = new Mock()
const client = new Client({
node: 'http://localhost:9200',
Connection: mock.getConnection()
})
mock.add({
method: 'GET',
path: '/'
}, () => {
return { status: 'ok' }
})
client.info(console.log)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us