×We're offering Women's Scholarships for applicants to our February class! Details here.
Let's once again rebuild our previous example using a shopping list, but this time we will not be using an array to store our data. Instead, we will be using a Mongo database! The resource we will be working with once again is
The application should have one model for
Item and each item should have:
The application should have the following routes:
GET /itemsto show all items in the shopping list
GET /items/newto show a form for creating a new item
GET /items/:idto show a single item
GET /items/:id/editto show a form for editing a item
POST /itemsto create an item when a form is submitted
PATCH /items/:idto edit an item when a form is submitted
DELETE /items/:idto delete an item when a form is submitted
GET /items/searchwhich allows a user to search for items in the shopping list.
DELETE /itemswhich allows a user to remove all the items in the shopping list.
User, which should have a reference to
Item. A user should be able to have their own list of items and have full CRUD over items in their list.
When you're ready, move on to Introduction to Heroku