#Codingninjas Assignnment
It is the simple product api developed for practice , User can add, update, delete ,and list the product detailAdd Product(Create)
->request(Post Request)
http://localhost:8000/create
->response
{
"data": {
"product": {
"_id": "5e7218a50de915060b8be89a",
"name": "iphone",
"quantity": "34",
"createdAt": "2020-03-18T12:48:37.250Z",
"updatedAt": "2020-03-18T12:48:37.250Z",
"__v": 0
}
}
}
Delete Product
->request(Delete Request)http://localhost:8000/:id
->response
{
Product deleted!
}
List All Product
->request(Get request)http://localhost:8000
->response
{
{
"products": [
{
"_id": "5e7218a50de915060b8be89a",
"name": "iphone",
"quantity": "34",
"createdAt": "2020-03-18T12:48:37.250Z",
"updatedAt": "2020-03-18T12:48:37.250Z",
"__v": 0
}
]<br>
}
}
2-Database ->MongoDB
To run this project, install it locally using npm:
$ npm install
$ npm start