We run Elasticsearch with Kibana and EnterpriseSearch locally for development. I can connect to AppSearch without issue, but I want to connect to Elasticsearch as https://localhost:9200 from my nodejs app with the latest elastic client using this configuration
{
node: 'https://localhost:9200',
auth: {
apiKey: {
id: ELASTIC_LOCAL_API_ID,
api_key: ELASTIC_LOCAL_API_KEY
}
}
}
I have tried multiple methods, including username and password and using the encoded key I got from ES, but I always get the same error. I followed some suggestions on StackOverflow but none of them worked.
I get this error
ConnectionError: unable to verify the first certificate