This repository contains the backend code for the web portal built using Node.js and Express. It provides REST-based APIs for performing CRUD operations on a CSV-formatted file stored in the local storage.
-
Clone the repository:
git clone https://github.com/kirtanmodi/web-portal-backend.git
-
Navigate to the backend directory:
cd backend
-
Install the dependencies:
npm install
-
Start the server:
npm start
The backend server will start running on port 11000.
GET /
- Retrieves all data from the CSV file.GET /:id
- Retrieves data by ID.POST /
- Creates new data.PUT /:id
- Updates data by ID.DELETE /:id
- Deletes data by ID.
Unit tests have been implemented to ensure the correctness of the backend code. To run the tests, use the following command:
npm test
Make sure that the backend server is not running while executing the tests.
Frontend Repository README: