{"id":13749361,"url":"https://github.com/elastic/bower-elasticsearch-js","last_synced_at":"2025-10-11T14:31:19.119Z","repository":{"id":57221369,"uuid":"14881797","full_name":"elastic/bower-elasticsearch-js","owner":"elastic","description":"Elasticsearch client for the browser","archived":false,"fork":false,"pushed_at":"2024-08-08T07:49:54.000Z","size":10543,"stargazers_count":65,"open_issues_count":2,"forks_count":29,"subscribers_count":354,"default_branch":"master","last_synced_at":"2025-01-28T20:58:32.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/elastic/elasticsearch-js-legacy","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elastic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-03T02:55:35.000Z","updated_at":"2024-10-07T21:21:53.000Z","dependencies_parsed_at":"2024-01-17T13:12:27.247Z","dependency_job_id":"b576c387-dc45-4333-a662-8712ddce8ed0","html_url":"https://github.com/elastic/bower-elasticsearch-js","commit_stats":{"total_commits":116,"total_committers":8,"mean_commits":14.5,"dds":0.6379310344827587,"last_synced_commit":"20245eebfb35917ba755648e3ffd3bbbc023745f"},"previous_names":["elasticsearch/bower-elasticsearch-js"],"tags_count":106,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fbower-elasticsearch-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fbower-elasticsearch-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fbower-elasticsearch-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fbower-elasticsearch-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elastic","download_url":"https://codeload.github.com/elastic/bower-elasticsearch-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236102609,"owners_count":19095206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T07:01:00.228Z","updated_at":"2025-10-11T14:31:13.553Z","avatar_url":"https://github.com/elastic.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# elasticsearch\n\nElasticsearch client builds for bower.\n\n# Install\n\nInstall with `bower`\n```\nbower install elasticsearch\n```\n\nAdd a `\u003cscript\u003e` to your html file and off you go!:\n```\n\u003cscript src=\"/bower_components/elasticsearch/elasticsearch.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var client = elasticsearch.Client({\n    host: 'localhost:9200'\n  });\n\u003c/script\u003e\n```\n\n## If you are using AngularJS\nUse `elasticsearch.angular.js` instead. This will create an `elasticsearch` module with an `esFactory` that you can use.\n```\n/*\n * create your app module, specify \"elasticsearch\" as a dependency\n */\nvar app = angular.module('myApp', ['elasticsearch']);\n\n/*\n * create a service, which provides your elasticsearch client\n * to other parts of your application\n */\napp.service('es', function (esFactory) {\n  return esFactory({\n    host: 'localhost:9200',\n    // ...\n  });\n});\n```\n## If you are using Angular2+\nin your module:\n\n```typescript\nimport * as es from 'elasticsearch-browser/elasticsearch'\n\n@NgModule({\n  providers: [\n    {\n      provide: 'elasticsearch',\n      useFactory: () =\u003e {\n        return new es.Client({\n          host: 'https://localhost:9200',\n        });\n      },\n      deps: [],\n    }\n  ]\n})\nexport class AppModule {}\n```\n\nin your service:\n\n```typescript\nexport class ExampleService {\n  constructor(@Inject('elasticsearch') private readonly elasticClient) {}\n}\n```\n\n## If you are using jQuery\nUse `elasticsearch.jquery.js` instead. Rather than a global `elasticsearch` it will create a `jQuery.es` namespace.\n```\nvar client = new $.es.Client({\n  hosts: 'localhost:9200'\n});\n```\n\n# Submit Issues, Pull Requests, etc to [elasticsearch-js](https://github.com/elasticsearch/elasticsearch-js).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Fbower-elasticsearch-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felastic%2Fbower-elasticsearch-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Fbower-elasticsearch-js/lists"}