
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
elasticsearch-browser
Advanced tools
The official low-level Elasticsearch client, for use in the browser.
Elasticsearch client builds for bower.
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>
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',
// ...
});
});
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'
});
FAQs
The official low-level Elasticsearch client, for use in the browser.
The npm package elasticsearch-browser receives a total of 2,641 weekly downloads. As such, elasticsearch-browser popularity was classified as popular.
We found that elasticsearch-browser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.