8000 GitHub - Samueltommzy/productBackend: Code for product backend
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Samueltommzy/productBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

productBackend

Code for product backend

Steps To test this API on your local machine

  • Clone this repo

  • navigate to the directory on your local machine and run npm install command

  • make sure tto have mongodb service running and replace the database url in the ./config/database.js directory as appropriate

  • run npm start command

  • To List all the available products

    • using curl
      • curl -H 'Content-Type: application/json' http://localhost:3000/Products
  • To create a product

    • using curl curl -X POST --header "Content-Type: application/json" -d '{"Name":"gucci Sneakers","Description":"This is a white Sneakers","Price":"$200","Category":"Men wears",Image":"https://github/Samueltommzy","Color":"White"}' http://localhost:3000/Product
  • To view a particular product

    • using curl curl -H 'Content-Type: application/json' http://localhost:3000/product/_id

Steps to test the hosted API

About

Code for product backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0