Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hospital Backend Server

This is a simple Express.js backend server for a doctor's assignment, demonstrating basic CRUD operations on user kidney data.

Features

  • GET /: Retrieve the number of kidneys, healthy kidneys, and unhealthy kidneys for the first user.
  • POST /: Add a new kidney to the first user (specify isHealthy in the request body).
  • PUT /: Mark all kidneys of the first user as healthy.
  • DELETE /: Remove all unhealthy kidneys from the first user.

Installation

  1. Make sure you have Node.js installed.
  2. Run npm install to install dependencies.

Running the Server

Run node index.js to start the server on port 3000.

API Usage

Use tools like Postman or curl to test the endpoints. The server expects JSON data for POST requests.

Example POST request:

POST http://localhost:3000/
Content-Type: application/json

{
  "isHealthy": true
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages