Collaborators and Contributors: Tina Myers, Stacy Burris, Mariko Alvarado, Nathan Cox, Ricardo Barcenas, Brai
PORT
- 3000MONGOOSEDB_URI
- mongodb://localhost:27017/lab04db
-
npm start
-
Routes
GET /tree
returns an array of all of the tree objects in the databaseGET /tree/:id
returns{ name: Cedar, id: 2 }
POST /tree
adds a new tree to the databasePUT /tree/:id
updates a tree objectDELETE /tree/:id
deletes a specified recordGET /food
returns an array of all of the food objects in the databaseGET /food/:id
returns{ name: Apple, id: 2, calories: 50, type: fruit }
POST /food
adds a new food to the databasePUT /food/:id
updates a food objectDELETE /food/:id
deletes a specified record
- Unit Tests:
npm test