I've seen this code from some tutorials that I've been looking at for Nodejs.
module.exports = router;
I've also looked at this quick post from sitepoint.com about module.exports and I'm a bit confused... why do I see that line at the bottom of some files (not many), while I see code more like that from sitepoint.com in many of the tutorials on Nodejs?
What is the difference, if any?
EDIT: I'm aware of this other SO question. I even looked at it before asking my question. The reason I asked my question is because the other post HAS SO MUCH information on it, its HARD to extract useful information from it when your JUST starting to learn about Nodejs. The 2 answers I received from asking this question clarified MY understanding of WHAT I was asking because there was very little information on the page to understand - IT was more direct and to the point. Not everyone on SO is well versed on Nodejs and all that it does, especially beginners.
While I agree, the 2 questions are very similar in nature. The older question had TOO much information on it, which is I asked my question.
The IMPORTANT thing (at least to me) is now I understand module.exports
.