[Backport 8.1] Update connecting documentation (#1668)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
45fab27d8a
commit
bc6fcde8f0
@ -8,7 +8,10 @@ HTTP status codes which should not be considered errors for this request.
|
||||
'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 () {
|
||||
const bulkResponse = await client.bulk({
|
||||
|
||||
Reference in New Issue
Block a user