Code Monkey home page Code Monkey logo

elasticangular's Introduction

Elasticsearch with Angular

Up and run with ELasticsearch

  1. Installation and Get started guide from angular-cli

  2. Create a docker-compose file to run the Elasticsearch as docker container or you can also install on your host machine.

Run elasticsearch

Container

elasticsearch.yml

version: '3.3'
services:
  elasticsearch1:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.1.1
    environment:
      ES_JAVA_OPTS: '-Xms256m -Xmx256m'
      cluster.name: es-cluster
      node.name: es1
      network.bind_host: 0.0.0.0
      discovery.zen.minimum_master_nodes: 1
      discovery.zen.ping.unicast.hosts: elasticsearch1
      xpack.security.enabled: 'false'
      xpack.monitoring.enabled: 'false'
      xpack.watcher.enabled: 'false'
      xpack.ml.enabled: 'false'
      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
      logger.level: debug
    volumes:
      - esdata1:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
      - 9300:9300
volumes:
  esdata1:
    driver: local
docker-compose -f elasticsearch.yml up -d

NOTE : When you run elastic search you will face "Bootstrap checks failing" of "max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]"

Follow this instructions to resolve your issue

Elasticsearch - Bootstrap checks failing

OR

You can also install on host

  • Installation

  • CORS need to be activated to connect to the elasticsearch from the application.

Development server

Install npm packages, if it is done ignore.

npm install

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Production with Docker

  • Comming.....

Packages required

npm install --save elasticsearch

elasticangular's People

Contributors

jinnabaalu avatar

Stargazers

Hamid Habib avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

vanthaiunghoa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.