/product-api

A Simple CRUD API built with NestJS

Primary LanguageTypeScriptMIT LicenseMIT

Product Api

Github top language Github language count Repository size License


🎯 About

A Simple CRUD API built with NestJS

✨ Features

✔️ User can GET/POST/PATCH/DELETE Products

🚀 Technologies

The following tools were used in this project:

✅ Requirements

Before starting 🏁, you need to have Git and Node installed.

🏁 Starting

# 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>

🏁 Usage

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

📝 License

This project is under license from MIT. For more details, see the LICENSE file.

Made with ❤️ by Nkosilathi Tauro

 

Back to top