-------------- SIMPLE API OF STORE PRODUCTS ---------
IN THIS API USER CAN GET ALL PRODUCTS AND THEIR ALL FIELDS USER CAN GET SOME SELECTED FIELDS USER CAN SEARCH USING NAME OF PRODUCT AND COMPANY USER CAN SORT PRODUCTS USER CAN LIMIT PRODUCTS
get('api/v1/products');
get('api/v1/products?name=(name here)')
get('api/v1/products?company=(comapny name here)')
get('api/v1/products?sort=(name,price)')
add a - prefix for decending
get('api/v1/products?limit=(limit here)')
get('api/v1/products?select=(fields here separated by comma)')
get('api/v1/products?page=(page here i.e 2)')
{ "_id":"63fe4fc543b8fd3fe12f13da" "featured":"false" "rating":4 "createdAt":"2023-02-28T19:01:59.291+00:00" "name":"accent chair" "price":25 "company":"marcos" }