jack-db-elasticsearch

1.0.1 • Public • Published

jack-db-elasticsearch

NPM version Downloads

This Jack-Stack Plugin is used to add create jack.db.elasticsearch.

jack.add(require('jack-db-elasticsearch'));

Configuration

You can either pass in your configuration:

var jack = require('jack-stack');
var elasticsearch = require('jack-db-elasticsearch');

jack.add(elasticsearch.configure({
  url: '1.1.1.1', // Some IP
  port: '1234', // Some PORT
  hash: 'q="something"', // Some optional hash
}));

Or you can use node-config and set the config variables in your config/ files:

module.exports = {
  db: {
    elasticsearch: {
      url: '1.1.1.1', // Some IP
      port: '1234', // Some PORT
      hash: 'q="something"', // Some optional hash
    },
  }
};

Options

You can either set the host parameter:

elasticsearch.configure({
  host: 'https://full:path@to.domain:port'
})

or you can use the url and port (and optional hash) options:

elasticsearch.configure({
  url: '1.1.1.1', // Some IP
  port: '1234', // Some PORT
  hash: 'q="something"', // Some optional hash
});

This uses the format: host = config.url + ':' + config.port + (config.hash || '')

Dependents (0)

Package Sidebar

Install

npm i jack-db-elasticsearch

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dncrews