File tree Expand file tree Collapse file tree 1 file changed +37
-2
lines changed Expand file tree Collapse file tree 1 file changed +37
-2
lines changed Original file line number Diff line number Diff line change 1- # elasticsearch-local
2- Run any version of ElasticSearch locally
1+ # elasticsearch-local [ ![ CircleCI] ( https://circleci.com/gh/shelfio/elasticsearch-local/tree/master.svg?style=svg )] ( https://circleci.com/gh/shelfio/elasticsearch-local/tree/master ) ![ ] ( https://img.shields.io/badge/code_style-prettier-ff69b4.svg ) [ ![ npm (scoped)] ( https://img.shields.io/npm/v/@shelf/elasticsearch-local.svg )] ( https://www.npmjs.com/package/@shelf/elasticsearch-local )
2+
3+ > Run any version of ElasticSearch locally
4+
5+ ## Usage
6+
7+ ### 0. Install
8+
9+ ```
10+ $ yarn add @shelf/elasticsearch-local --dev
11+ ```
12+
13+ ### 1. Start Elasticsearch
14+
15+ ``` js
16+ import {start } from ' @shelf/elasticsearch-local' ;
17+
18+ await start ({
19+ esVersion: ' 7.3.0' ,
20+ port: 9000 , // optional
21+ clusterName: ' test' , // optional
22+ nodeName: ' test' , // optional
23+ indexes: [' one' , ' two' ] // optional
24+ });
25+ ```
26+
27+ ### 2. Stop Elasticsearch
28+
29+ ``` js
30+ import {stop } from ' @shelf/elasticsearch-local' ;
31+
32+ await stop ();
33+ ```
34+
35+ ## License
36+
37+ MIT © [ Shelf] ( https://shelf.io )
You can’t perform that action at this time.
0 commit comments