[Backport 8.0] Update connecting documentation (#1667)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e68dec802a
commit
85459370bc
@ -17,7 +17,10 @@ manipulate the result to obtain an object easy to navigate.
|
||||
'use strict'
|
||||
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({ node: 'http://localhost:9200' })
|
||||
const client = new Client({
|
||||
cloud: { id: '<cloud-id>' },
|
||||
auth: { apiKey: 'base64EncodedKey' }
|
||||
})
|
||||
|
||||
async function run () {
|
||||
await client.index({
|
||||
|
||||
Reference in New Issue
Block a user