Express Mongoose Fullstack App.
Inspired by the Open Access API at The Metropolitan Museum of Art
Full CRUD API for a single resource
- have one model with at least three properties
- models properties must use more than one data type(String, Number, Boolean, Date etc.)
- have a controller allowing for full CRUD functionality.
- This includes the following routes
- index route to view all instances of the resource
- show route to view one single instance of the resource
- post route to create an instance of the resource
- patch route to update one instance of the resource
- delete route to destroy one instance of the resource
- You must send the response as JSON(this will come into play later) as well as with an appropriate status code
Routes Your app should use RESTful routes:
URL | HTTP Verb | Action |
---|---|---|
/objects/ | GET | index |
/objects/new | GET | new |
/objects | POST | create |
/objects/:id | GET | show |
/objects/:id/edit | GET | edit |
/objects/:id | PATCH/PUT | update |
/objects/:id | DELETE | destroy |
Clone this repo and run npm install
in your terminal, followed by nodemon server.js
.