- List the 5 crud operations, what information the request has, and what information is in the respose
- Define what Knex.js is
- Follow the request response cycle for an API that uses databases
- Explain what how the model and the controller are working together to compose a response
- Describe what happens when you
throw
inside a promise callback. - Describe how a database is set up.
- Create a select all controller and model
- Create a select one controller and model
- Create a create controller and model
- Create an update controller and model
- Create a delete controller and model
- Use SQL joins to create create a nested resource
List the 5 crud operations, what information the request has, and what information is in the respose
- With you tables, create a table of request and responses information for each HTTP method
- With your table, create a description of what Knexjs is and why it is useful
- Clone the following repo https://github.com/rogerwschmidt/school-api
- With your tables, draw a diagram of what happens when you hit the route
/instructors
- With your table, explain why promises are being used to commicate between the controller and the model for the route
/instructors
- With your table, explain what is happening when you
throw
inside a callback
- With your table, investigate the
./db/index.js
and./knexfile.js
- In the
./src/models/instructors
file, what is being required to use thedb
- In groups of 2/3 create a getAll controller and model for
/students
- In groups of 2/3 create a getOne controller and model for
/students/:id
- In groups of 2/3 create a create controller and model for `/students
- In groups of 2/3 create a update controller and model for
/students/:id
- In groups of 2/3 create a remove controller and model for
/students/:id
- In groups of 2/3 create a getAll students for the
cohorts
resource./cohorts/:cohortId/students