Get all products from database.
URL : /api/products
Method: GET
Code: 200 OK
[
{
"__v": 0,
"_id": "6369523318c90dd1e14fd8b0",
"createdAt": "2022-11-07T18:45:07.229Z",
"name": "ball",
"price": 5,
"updatedAt": "2022-11-07T18:45:07.229Z"
},
{
"__v": 0,
"_id": "636952bedc28685ef0f7aa85",
"createdAt": "2022-11-07T18:47:26.263Z",
"name": "shoes",
"price": 20,
"updatedAt": "2022-11-07T18:47:26.263Z"
}
]