- Fork and clone this repository, then
cd
into the directory you cloned it to npm install
- If you don't want to have to kill and restart your server, install nodemon with
npm install -g nodemon
and run the exercise usingnodemon server.js
Implement a CRUD interface for cars. Style (CSS), authentication, and validations are not required for this exercise. The primary goal is to make sure that the entire CRUD interface is covered appropriately for this single resource.
The Car
model has been provided for you, as well as sample usage for it inside of server.js
. A recommended ordering for this exercise is: index, new, create, edit, update, destroy.
Recall that browsers only natively support GET
and POST
, the (other methods are available via AJAX). Given this fact, you will need to handle update and destroy with routes instead, /cars/:id/update
and /cars/:id/delete
, respectively.
- Implement validations and a system for reporting back flash messages (or find a node package that handles flash messages).
- Use this StackOverflow post to introduce a layout that links between the index and new views.
- Add some style to this simple CRUD app.