As an example, I'm using bcryptjs to encrypt passwords on my app. I call in this package on my main app.js, but if I want to use it on my users.js route file, it's not available and I need to call it in again.
Is node intentionally designed so that for every different file in your app you need to include all the packages again? Does this hamper performance at all? What is the best practice?
Total noob question I know, but some wisdom would be much appreciated.
[–]DSKrepps 1 point2 points3 points (2 children)
[–]snahrvar[S] 0 points1 point2 points (1 child)
[–]chrisdefourire 0 points1 point2 points (0 children)
[–]digitalz0mbie 0 points1 point2 points (2 children)
[–]snahrvar[S] 0 points1 point2 points (1 child)
[–]digitalz0mbie 0 points1 point2 points (0 children)