0% found this document useful (0 votes)
7 views1 page

PROG3017 FullStack Lab3B

Uploaded by

absolutigahiga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

PROG3017 FullStack Lab3B

Uploaded by

absolutigahiga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like