This project demonstrates a basic CRUD (Create, Read, Update, Delete) API built using Node.js and Express.js.
- Create: Add new products to the database.
- Read: Retrieve all products or a specific product by ID.
- Update: Modify an existing product by ID.
- Delete: Remove a product from the database by ID.
- Node.js
- Express.js
- MongoDB with Mongoose
- POST
/api/products
{
"name": "Product Name",
"price": 100,
"description": "Product Description"
}
- Clone the repository
- Navigate to the project directory
- Install dependencies
- Create a .env file and add your MongoDB connection string
- Start the server