Skip to content

Commit 638cfd6

Browse files
p1c2 => connect to elasticsearch host
1 parent 0caa785 commit 638cfd6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)