This is a simple RESTful API built with Node.js that allows for CRUD (Create, Read, Update, and Delete) operations on a "user" entity. Developed for learning purposes as a task of the RS-school Node.js course.
- Using a TDD approach, tests were written first and then the code was written to pass those tests.
- The server is built using the native Node.js HTTP module.
- The database is an in-memory implementation.
- The API can be horizontally scaled using the Node.js cluster module for improved performance.
- Tests include both unit and integration tests, using Jest.
- TypeScript is used as the primary language.
- Clone the repository
- Checkout to the
TASK-3-simple-crud-api
branch - Install dependencies by running
npm install
- Available Scripts:
npm start
: start the servernpm run build
: Clean the build folder and transpile the codenpm run start:dev
: start the server with nodemon for developmentnpm run start:prod
: Clean the build folder, transpile the code and start the servernpm run start:multi
: Clean the build folder, transpile the code and start the server with the node.js cluster modulenpm run clean
: Clean the build foldernpm run test
: run the tests with jest.
- You can now send requests to the API at
http://localhost:4000