A simple and straightforward CRUD API built with NestJS framework. 🌟
- 🌐 Basic CRUD operations (Create, Read, Update, Delete).
- ⚙️ Modular and scalable architecture using NestJS modules.
- 🛠️ Built-in validation and error handling.
- 📦 Ready-to-use configuration for database connectivity.
- 🔄 Logging and request/response interception for debugging.
- 🧪 Unit tests with Jest for ensuring code quality.
Ensure you have Node.js and npm installed on your system. Then, follow these steps:
- Clone the repository:
git clone https://github.com/Armanidrisi/nestjs-rest-api.git
- Navigate to the project directory:
cd nestjs-rest-api
- Install the dependencies:
npm install
- Set up the configuration file:
cp .env.example .env
- Customize the
.env
file with your configuration settings.
To start the development server, run the following command:
npm run start:dev
Visit http://localhost:3000 to access the API.
The API exposes the following endpoints:
GET /items
: Get all items.GET /items/:id
: Get a specific item by ID.POST /items
: Create a new item.PUT /items/:id
: Update an existing item.DELETE /items/:id
: Delete an item.
To run the unit tests, execute the following command:
npm run test
- NestJS: Framework for building scalable and maintainable server-side applications.
- PostgreSQL: Relational database management system.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Commit and push your code.
- Submit a pull request.
This project is licensed under the MIT License.
If you encounter any issues or have suggestions, please open an issue.
- Author: Arman Idrisi
- Follow: GitHub
Feel free to reach out if you have any questions or feedback!
Enjoy using the Simple CRUD API! If you find it helpful, please give it a ⭐️ to show your support.