Skip to content

CRUD on Hospital data JSON file using Core modules from Node JS and Express

Notifications You must be signed in to change notification settings

ManjushaFSD/Hospital-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hospital-server

💫 CRUD on Hospital data JSON file using Core modules from Node JS and Express

The requirement is as follows 📝

  • Set up Hospital Data in JSON file with following information: Name of the hospital, Patient Count and Hospital location
  • Perform CRUD(GET,POST,PUT,DELETE) operations on the dataset
  • Use the core modules available in NodeJS to read,write to the JSON file.

GET request - Read list of all hospitals

➡️ GET http://localhost:3000/api/hospitals

POSTMAN results: GET Request

GET request - Read a single hospital

➡️ GET http://localhost:3000/api/hospitals/:id

POSTMAN result:

GET Request anyone hospital

POST request - Create a new Hospital

➡️ POST http://localhost:3000/api/hospitals

POSTMAN result:

POST Request

PUT request - Update an existing Hospital

➡️ PUT http://localhost:3000/api/hospitals/:id

POSTMAN result:

Before PUT request is sent

Before PUT request is send

After PUT request is sent

After PUT request is send


DELETE request - Delete an existing hospital

➡️ DELETE http://localhost:3000/api/hospitals/:id

POSTMAN result:

Before DELETE request is sent

Before Sending the DELETE Request

After DELETE request is sent

DELETE Request

About

CRUD on Hospital data JSON file using Core modules from Node JS and Express

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published