This repository serves as the solution to the assignment creating custom CRUD API which uses only Node.js core modules and an in-memory database. The API is designed to handle basic operations for managing user records.
In addition, the application includes Jest unit tests, Webpack pipelining, clustering and load balancing features to leverage multiple Node.js processes for improved performance.
-
Clone this repository.
-
Install dependencies
npm install
. -
Set the port value in the
.env
file. -
Start the application and run tests
npm run start:dev # dev mode npm run start:prod # prod mode npm run start:multi # cluster mode npm run test # execute testing scripts
- Create:
POST /api/users
- Read (All):
GET /api/users
- Read (One):
GET /api/users/{userId}
- Update:
PUT /api/users/{userId}
- Delete:
DELETE /api/users/{userId}