Skip to content

Timfrazer/bonobos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bonobos

  1. Install node https://nodejs.org/en/download/
  2. Install mongo db https://docs.mongodb.com/manual/installation/

Import the data into mongo

  1. go to the data folder inside of the project
  2. mongoimport --headerline --type csv --db ecomm --collection products --file products.csv
  3. mongoimport —headerline --type csv --db ecomm --collection inventory --file inventory.csv

Grab files

  1. git clone https://github.com/Timfrazer/bonobos.git
  2. inside the folder type npm install
  3. Start the mongo server type mongod
  4. start node type npm start

Server is now running....

let's test out the API Test the API via CURL use any product id may I sugest the number 1

  1. GET a product - curl localhost:3000/product/1
  2. GET all products - curl localhost:3000/product
  3. GET the inventory for a product - curl localhost:3000/inventory/1
  4. GET all inventory - curl localhost:3000/inventory
  5. GET product & inventory - curl localhost:3000/productinventory/1

About

Homework baby!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published