Drive comfortably
Into app/server folder:
npm install
npm start
Open a webpage and enter those 2 endpoints:
- localhost:9292/populate
- localhost:9292/cars
The 10 models with the biggest volume would appear on the cars endpoint in the JSON format.
Table of Contents generated with DocToc
- Introduction
- Objective - Workshop in 1 sentence
- How to do that?
- Just tell me what to do
- Examples of steps to do
- MVP
- Don't forget
- Licence
caradisiac.com provides a tone of technical records related to car specification.
Build an api that get the list of cars with the higher rate and the higher volume (car boot)
The api
- must listen port
9292
- must provide endpoint
/populate
to index records to Elasticsearch - must provide endpoint
/cars
that return list of cars with the higher car boot volume
By indexing technical records from caradisiac to Elasticsearch and build an api with Node.js
Node.js + ES6 + Elasticsearch
- Fork the project via
github
- Clone your forked repository project
https://github.com/YOUR_USERNAME/caradisiac
❯ cd /path/to/workspace
❯ git clone git@github.com:YOUR_USERNAME/caradisiac.git
- Follow the steps
- commit your different modifications:
❯ cd /path/to/workspace/caradisiac
❯ git add -A && git commit -m "feat(es): index in bulk all car records"
(why following a commit message convention?)
- Don't forget to push before the end of the workshop and before the end of the dedicated sessions
❯ git push origin master
Note: if you catch an error about authentication, add your ssh to your github profile.
- If you need some helps on git commands, read git - the simple guide
- use the package node-car-api to get all records in json format
- index - with bulk - all records to Elasticsearch
- Build an api that provide endpoint
/populate
- Build an api that provide endpoint
/cars
- The
/cars
endpoint could be a ES query to fetch the right data
- Build an api that provide endpoint
/populate
to index records to Elasticsearch - Build an api that provide endpoint
/cars
that return list of 10 first cars with the higher car boot volume
Display the list of the cars with React
Focus on api