Socket
Socket
Sign inDemoInstall

elasticsearch-browser

Package Overview
Dependencies
0
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    elasticsearch-browser

The official low-level Elasticsearch client, for use in the browser.


Version published
Weekly downloads
2.7K
decreased by-0.19%
Maintainers
3
Install size
9.62 MB
Created
Weekly downloads
 

Readme

Source

elasticsearch

Elasticsearch client builds for bower.

Install

Install with bower

bower install elasticsearch

Add a <script> to your html file and off you go!:

<script src="/bower_components/elasticsearch/elasticsearch.js"></script>
<script>
  var client = elasticsearch.Client({
    host: 'localhost:9200'
  });
</script>

If you are using Angular

Use elasticsearch.angular.js instead. This will create an elasticsearch module with an esFactory that you can use.

/*
 * create your app module, specify "elasticsearch" as a dependency
 */
var app = angular.module('myApp', ['elasticsearch']);

/*
 * create a service, which provides your elasticsearch client
 * to other parts of your application
 */
app.service('es', function (esFactory) {
  return esFactory({
    host: 'localhost:9200',
    // ...
  });
});

If you are using jQuery

Use elasticsearch.jquery.js instead. Rather than a global elasticsearch it will create a jQuery.es namespace.

var client = new $.es.Client({
  hosts: 'localhost:9200'
});

Submit Issues, Pull Requests, etc to elasticsearch-js.

FAQs

Last updated on 26 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc