Tutorial video from 1:29:00 to 3:07:18.
Students finish the task manager API, which they started last week. This is the first proper API with a database connection (MongoDB) in the course.
Students add 3 features:
Students should have completed the following in the 03-task-manager/starter
directory:
app.js
: updated to use their defined not-found
and error-handler
middleware and serving static code from the public
folder (the code in the
public folder is created already for them)controllers/tasks.js
: all routes should now fully talk to the database and
forward requests to the error handler middleware if there are errors
saving to the databaseerrors/cusotm-errors.js
: custom error classmiddleware/async.js
: custom async wrapper to be used in all the tasks
routersmiddleware/error-handler.js
: custom middleware for handling errors using
the custom error classmiddleware/not-found.js
: custom middleware for handling 404 route not
found errorsmodels/Task.js
: should have added required fields and validation fields to
the modelExpect to find a file QuizAnswers2.txt
with answers to open-ended questions.
Look at the lesson page for details.