I am going through a MEAN stack development PDF .
Every Time i need to create a new API , they ask to add required packages in packages.json
file and run npm install
.
Example :
{
"name": "node-api",
"main": "server.js",
"dependencies": {
"morgan": "~1.5.0",
"express": "~4.10.3",
"body-parser": "~1.9.3",
"mongoose": "~3.8.19",
"bcrypt-nodejs": "0.0.3"
}
}
then do in terminal:
npm install
So if I create new API say API2 then again i need to do the same and all the packages are downloaded again for node_modules:
My Question is: can't we download and store these packages locally and use whenever we require them, just like we do in Python or C++, instead of Downloading every time again.