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 trialNeil Ganotisi
20,975 PointsWhat specifically happens when the module.exports line gets used?
In this particular video, the below line gets used when "exporting the router".
module.exports = router;
What happens when this line gets used when interpreted by Node?
1 Answer
glasscheck
7,302 Pointsyou are exporting modules from one file, in this case the router function is being exported from that file, to be executed in another file( your main execution file )