Skip to content

Latest commit

 

History

History
executable file
·
48 lines (37 loc) · 1.9 KB

README.md

File metadata and controls

executable file
·
48 lines (37 loc) · 1.9 KB

ElasticaClinet User Management Symfony Bundle

(Elastica for Elasticsearch - Symfony - AngularJS)

ElasticaClient is an example user management symfony2 bundle. It is a Restful Api at the backend and uses AngularJs at the front end. It uses Elasticsearch as local storage and Elastica as PHP client for Elasticsearch.

The Project Consist From:

Installation

  1. You need Elasticsearch installed and make sure that Elasticsearch is running:

    $ sudo /etc/init.d/elasticsearch start
  2. Clone this project into your server.

  3. Run Composer to install the dependencies:

    php composer.phar update
  4. Go to /path-to-project/web/bundles/forntend/ folder from Console and run Bower to update dependencies:

    bower update
  5. Create Index and Type in Elasticsearch by adding an example user by running:

    curl -XPUT 'http://localhost:9200/elastica/user/1' -d '{
    	"name" : "John",
    	"email" : "[email protected]",
    	"password" : "test"
    }'
  6. Browse http://host:port/path-to-project/web/app_dev.php/

Not: You can use different Index and Type in Elasticsearch. For that please change the parameters from /path-to-project/src/ElasticaClient/UserBundle/Resources/config/parameters.yml and create your Elasticsearch Index and Type.

API Documentation

Browse http://host:port/path-to-project/web/app_dev.php/api/doc to see Restful api documentation created by Nelmio Api Doc Bundle.