This project is made of a Node.js & Express.js API found in the backend folder and a React.js front end found in the frontend folder.
Setup the project locally on your PC
- Clone the repository to your local machine
- Cd into project folder
- Change directory into backend folder and run the following command to install it's dependencies
npm install
- To run the API run:
npm run start
- To view the API's docs type the following url into your browser
http://localhost:3001/api-docs
You will see the web page below
-
To run API tests run the following command:
npm run test
You will see the tests as well as the code coverage of the tests -
with the API set up now preferably in another Terminal tab change directory into frontend folder and install it's dependencies
npm install
-
To run the front end run:
npm start
-
To view the front end type the following url into your browser
http://localhost:3000
You will see the web page shown below
- To run the front end tests with code coverage, run the following command:
npm test -- --coverage
Initially one test or none might be shown since the command prioritizes files that were changed in most recent commit so to run all frontend tests follow the prompt generated by the test command above and type "a" in the terminal the prompt will appear as shown below