# nodejs-sample-task


Sample task for nodejs, extjs, mongodb, elasticSearch.

## Building and installing
Prepare the data for the database. Look into the `config.json` for the database name which will be used by an
application. Connect to the database specified there with a mongo console, and get the `mongodb/mongo-sample-data.js` to store first books.

Then, carry on to building application. First, run

 * `npm install`

This will install the dependencies. Then,

`node server.js`

Which runs the server.


---
### Elastic Search
install to project

 * npm install elasticsearch client

Download Elastic Search server 

http://www.elasticsearch.org/download/

run elasticsearch server

`node book-search.js`

---
### Test project
Go to the directory

{project}/node_modules/.bin
execute command
* mocha --require should --reporter spec ../../tests





# nodejs-sample-task


Sample task for nodejs, extjs, mongodb, elasticSearch.

## Building and installing
Prepare the data for the database. Look into the `config.json` for the database name which will be used by an
application. Connect to the database specified there with a mongo console, and get the `mongodb/mongo-sample-data.js` to store first books.

Then, carry on to building application. First, run

 * `npm install`

This will install the dependencies. Then,

`node server.js`

Which runs the server.


---
### Elastic Search
install to project

 * npm install elasticsearch client

Download Elastic Search server 

http://www.elasticsearch.org/download/

run elasticsearch server

`node book-search.js`

---
### Test project
Go to the directory

`{project}`/node_modules/.bin
execute command
* mocha --require should --reporter spec ../../tests





Add instruction for start test
Add instruction for start test
