Simple crud basic model homework excercise
- Create an express app, with a db folder, and a model folder.
- Set up the DB connection in the db folder with a database called animals
- Set up the model schema (aka wireframe object) in the model folder. (file name -> Animal.js)
- Create the 5 methods in your server file (the http verbs, what are they?).
- Test each route with postman
Hints: Are you requiring your db folder, are you requiring your model folder, What is postman used for? Did you click x-www-form-encoded, in the body or the params in postman? What are the HTTP request? Is the browser a client? is postman a client? What is a Client? Did you require 'body-parser'? Did you google the error? What's the deal with airplane peanuts?
Bonus: Create a form in a view, that submits data all the way to the database.