We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0caa785 commit 638cfd6Copy full SHA for 638cfd6
p1-node-elasticsearch-project/es-connect.js
@@ -0,0 +1,8 @@
1
+const elasticsearch = require('elasticsearch');
2
+const client = new elasticsearch.Client({
3
+ host: 'http://localhost:9200'
4
+});
5
+
6
+client.ping()
7
+ .then(res => console.log('connection success', res))
8
+ .catch(err => console.error('wrong connection', err));
0 commit comments