Package Exports
- @shelf/elasticsearch-local
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@shelf/elasticsearch-local) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
elasticsearch-local

Run any version of ElasticSearch locally
Usage
0. Install
$ yarn add @shelf/elasticsearch-local --dev1. Start Elasticsearch
import {start} from '@shelf/elasticsearch-local';
await start({
esVersion: '7.3.0',
port: 9000, // optional
clusterName: 'test', // optional
nodeName: 'test', // optional
indexes: [
{
name: 'your-index',
// create index with options - https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-request-body
body: {
settings: {
number_of_shards: '1',
number_of_replicas: '1'
},
aliases: {
'some-acc-id': {}
},
mappings: {
"properties": {
"field1" : {"type" : "text"}
}
}
}
] // optional
});2. Stop Elasticsearch
import {stop} from '@shelf/elasticsearch-local';
await stop();Publish
$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tagsLicense
MIT © Shelf