Skip to content

piyushk1/Product-Category-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Product-Category-API

API to manage products and categories

Getting Started

Prerequisites

Node.js
MongoDB

Installation

1. Clone the repository:

git clone https://github.com/<your-username>/product-category-api.git

2. Install dependencies:

cd product-category-api
npm install

3. Start the server:

node server.js

The API should now be running at http://localhost:3000.

API Endpoints

Products

`GET /products `- Retrieve all products  
`GET /products/:productId` - Retrieve a product by ID  
`GET /productsWithCategories `- Retrieve all products with 	their corresponding category objects  
`POST /products `- Create a new product  
`PUT /products/:productId` - Update a product by ID  
`DELETE /products/:productId` - Delete a product by ID  

Categories

`GET /categories` - Retrieve all categories  
`GET /categories/:categoryId` - Retrieve a category by ID  
`DELETE /categories/:categoryId` - Delete a category by ID  

For API Testing on POSTMAN

POSTMAN Documentation Link

Postman Link

About

API to manage products and categories

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published