I notice that students' answers to this question in week 6 is generally not
great:
In this lesson, you created a middleware function called asyncWrapper. Why?
I have my own perspective on answering this question, but the ideal writeup
will be aligned with what the YouTube tutorial says. Maybe the YouTube
tutorial just glazes over explicitly answering this question... I am not sure;
I haven't reviewed it yet.
In any case, I think the best answer here is something about it being an
example of the adapter pattern. We have to adapt from the
callback-async-paradigm of Express to the async/await paradigm that we'd prefer
to write our programs in.
I notice that students' answers to this question in week 6 is generally not great:
I have my own perspective on answering this question, but the ideal writeup will be aligned with what the YouTube tutorial says. Maybe the YouTube tutorial just glazes over explicitly answering this question... I am not sure; I haven't reviewed it yet.
In any case, I think the best answer here is something about it being an example of the adapter pattern. We have to adapt from the callback-async-paradigm of Express to the async/await paradigm that we'd prefer to write our programs in.