A Simple CRUD API built with NestJS
✔️ User can GET/POST/PATCH/DELETE Products
The following tools were used in this project:
Before starting 🏁, you need to have Git and Node installed.
# Clone this project
$ git clone https://github.com/nkosi-tauro/product-api
# Access
$ cd product-api
#MongoDB
$ update connection string to your DB
# Install dependencies
$ npm install
# Run the project
$ npm start
# The server will initialize in the <http://localhost:3000>
Using Postman or a service of your choice
# POST new Product
$ http://localhost:3000/products
-> Body -> JSON
{
"title": "New Title",
"description": "New Description",
"price": 13000
}
# GET All Products
$ http://localhost:3000/products
# GET Single Product
http://localhost:3000/products/:id
# PATCH Product
$ http://localhost:3000/products/:id
-> Body -> JSON
{
"title": "New Udpated Title",
"description": "New Udpated Description",
"price": 13000
}
# Delete Single Product
http://localhost:3000/products/:id
This project is under license from MIT. For more details, see the LICENSE file.
Made with ❤️ by Nkosilathi Tauro