/angular2-elastic

Angular2 elasticsearch, autocomplete sample

Primary LanguageTypeScript

CircleCI

Description

  • Elasticsearch usage example
  • Autocomplete control developed with angular 2

##First of all

  • Install elasticsearch server according to the instructions.
  • Add this lines to your elasticsearch.yml configuration file (it's not recommended in real app):
http.cors.enabled : true 
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length

Quick start

Install:

npm install -g webpack webpack-dev-server
npm install

Build:

npm run build

Start in dev mode (available on localhost:8080 by default)

npm run dev

Follow this steps:

  1. Go to admin tab and add something to the elasticsearch index using provided form
  2. Go back to the client page
  3. Search! (performed by title field by default)