Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMark Westerweel
Full Stack JavaScript Techdegree Graduate 22,378 PointsAsync Handler link
In the vid, Guil says "more on the async handler in the teacher's notes".
Here's the link to the NPM page, in case you want more info, or manually use it for your projects.
https://www.npmjs.com/package/express-async-handler
It is basically a callback function that you can pass other functions in and make them asynchronous . This will clean up your code a lot and make it DRYer.
You use this callback everytime a function is invoked (and needs to be a callback) as second parameter in you express routing.