An online version of this project is hosted here:
http://cohesive.dev/lrgk-hotels/hosted
Prerequisite: run yarn
to install all project dependencies.
Project is split into 2 parts:
-
Mock REST API, which is a façade remote data source.
- Start this with
yarn mock-api
- This will spin up the mock API at http://localhost:3001
- Start this with
-
Frontend, which displays and filters data.
- Start this in development mode with
yarn watch
- Go to http://localhost:3000
- Start this in development mode with
Start both to run the project!
yarn test
will run all tests within the codebase, and report on coverage can be found in coverage/index.html
.
- Most important bits to test are where data is being manipulated or otherwise transformed for later consumption
- Least important bits to test are the areas of glue code or code that is easily tested by a simple smoke test / run through of the happy path
yarn build
will generate the production HTML and JS resources
This project can also run its mock API on the Heroku PaaS, just create a new
pipeline, add an app and point the pipeline to this repo, the Procfile
is
preset and ready to use.
- Would be better using a CSS-in-JS lib
- UI design could be better, focus is around showing real React/Redux code