Hello fellow programmers,
I'm pretty new to node.js and I've just inherited a massive project that's built in node and I need to prepare it for small team development.
I apologize in advance for my newbieness.. I hope to become much better at node.js in the coming months (I have no choice)
I plan to use SVN and wanted to segment the existing project into many smaller repos to lessen the chance of conflicts when being working on by multiple people.
One thing I want to do is move the node_modules out of the main application repo because it causes commits and deployments to take waaay too long because of how massive the node_modules folder is.
I understand that the node_modules can be anywhere above the application root so right now I've set it up so it looks like this:
Before:
/var/myProjects/ProjectX/node_modules/
/var/myProjects/ProjectX/app.js
/var/myProjects/ProjectX/everything else
After:
/var/myProjects/node_modules/
/var/myProjects/ProjectX/app.js
/var/myProjects/ProjectX/everything else
I run my app and everything seems to be working fine.
Now here's my confusion. I wanted to make sure that having moved the node_modules folder one level up from my application root really worked. So I went ahead and renamed the node_modules folder to "test".
And low and behold.. my application doesn't break! It doesn't stop working.. which has me very puzzled. Where is it loading the dependencies from??
I noticed that /home/myUser/.npm/ appears to have all the same node_modules as the ones that were in my application. Is it loading it from there? How can I verify this?
Is what I did ok? Moving node_modules up one folder I mean.
Really appreciate your time. Thank you