- Implement CRUD/BREAD over HTTP with Express
- Use forms to submit HTTP requests
- Practice debugging Express
A framework that lets us create routes and write/include middleware.
CRUD = Create Read Update Delete
BREAD = Browse Read Edit Add Delete
A route is made up of a VERB and a PATH.
Verbs: GET, POST, PUT, PATCH, DELETE
Path: example.com
/resource, example.com
/resource/:id
REST means that the path that we are going to should represent the data being transferred.
An API that uses the REST convention is said to be RESTful.
RESTful routes look like:
- Browse: GET /resource
- Read: GET /resource/:id
- Edit: POST /resource/:id
- Add: POST /resource
- Delete: POST /resource/:id/delete
GET /unicorns/123
GET /users/123/posts/12
B - GET /dogs
R - GET /dogs/:id
E - POST /dogs/:id
A - POST /dogs | GET /dogs/new
D - POST /dogs/:id/delete