Lab
PROG 3017 LAB 3B
FULL STACK PROGRAMMING
Prerequisites
Clone the Github Classroom link provided on Brightspace.
Make sure that you have your Postman or similar client ready to perform your actions
against your endpoint.
The accompanying class lecture.
Instructions
Based on the initial demonstration done in class re. Express JS APIs, complete the following
using the provided people.json data file.
Step 1
Create a simple Express.js application called app.js
Run it using nodemon OR node --watch so that you can view changes as the application
runs.
Step 2
Add the provided people.json data file into your application and import it into your code
using the available require functionality of node.
Step 3
Create a GET endpoint /people which retrieves all of the data in the people.json file.
Create a GET endpoint /people/:id which retrieves the specified person in the dataset by
the :id parameter.
Create a POST endpoint /people which adds a new person into the person dataset.
Create a PUT endpoint /people/:id which replaces the data for a specific person according
to the specified :id parameter.
Create a DELETE endpoint /people/:id which deletes/removes the specified person data
from the dataset according to the :id parameter.
Step 4
Demonstrate all of your endpoints by running Postman or similar client against your
running Express application.
NOTE: YOU DO NOT NEED TO WRITE TO THE INITIAL PEOPLE.JSON FILE TO
PERSIST ANY CHANGES. THIS MEANS THAT ONCE YOU STOP AND RESTART YOUR
APPLICATION THE ORIGINAL DATA WILL BE RELOADED INTO THE APPLICATION
AND ANY CHANGES MADE DURING THE PREVIOUS EXECUTION WILL BE LOST.
Semester- Fall Year- 2024/2025 1 of 1