🏔 Welcome to your first project using ExpressJS! This project already uses expressJS, and your mission is to write the application according to the instructions.
It also contains a data.json
with data to work with, which is already required in the project.
- Install the package nodemon using npm
- Create a script called "dev" in the package.json file to execute the command
nodemon index.js
- Run the command and make sure everything is okay. If it is, you are ready to work!
- Write a GET route to the path '/' that sends an HTML response with the following message:
Hello world!
- Write a GET route to the path '/loan' that sends a JSON response with the students that currently have a loan.
- Write a GET route to the path '/score' that sends an HTML response with the following message:
<h2>The group's average score is [num]</h2>
You will have to calculate the average first and then pass it to the HTML response. Make sure the avg is returned with only TWO decimals.