- React
- Sass - css preprocessor
- Eslint - code linter
- Jest & Enzyme - React testing tools
- main component :
<App/> - sub components:
<Profile/>,<NotFound/>
When it starts, user can select a profile --> search list is imported from components/utils/search.json
- Ogbu Olu ->
- show profile and picture via
<Profile/>component
- show profile and picture via
- Chuck Norris ->
- this profile record is deliberately not stored on
profiles.json[ server data ] - So the app handles this missing record, sending an appropriate
<NotFound/>component - (And besides, Chuck Norris is great in judo and brazilian jiu-jitsu, not karate ;))
- this profile record is deliberately not stored on
- Jet Li ->
- profile is stored
- profile picture is not stored
App also assumes:
-
server (api) has
assets/img/folder where thereq.params.idextracted from expressreq.urlcorresponds to a particular jpeg image file. -
each profile corresponds to a unique id ==>
req.params.id
-
Make sure yarn is installed:
Install yarn
npm i -g yarnCheck yarn version to make sure it's installed:
yarn -v -
If necessary, change the following default ports in
./port_config.js:-
server [ 4000 ] & client [ 8080 ]
Alternatively, store this info in an
.envfile. ( Remember.envfiles are generally not committed on git )
-
-
Clone or download the application
-
git cloneor download this repository -
cd ____orcd ____-master -
yarn setupto download required packages (client-side & server-side) -
yarn startto run the application ==> it opens up a new browser
- ESLint
yarn eslintornpm run eslint - Sass lint
yarn sass-lintornpm run sass-lint
- test:
yarn testornpm run test
- typecheck:
yarn tscornpx tsc