Quick Add NodeJS App Dependency Without Opening Package.json

On most Node.JS tutorials, you might see that to add dependency, you will be asked to open up your project’s package.json and manually edit the dependencies section. After editing, you will save it and go to console to type

$npm install

While this is true, however, there is another shortcut way to do this. With only one step, you can install the dependency and add config into package.json. Here is how you do it:

$npm install package-name --save

Pretty simple, isn’t it?

Author: Arief Bayu Purwanto

Hello, my name is Arief Bayu Purwanto, a 24 years old father of a beautiful daughter. Interested in online programming, linux, games, and reading. Currently working on kapanlagi.com as junior developer. I live in a relatively quite and cool place called Malang. I'm available for some freelance stuff as well as some consulting job. You can see my portofolio for some previous task I've finished and some other information related to my capability. Btw, I'm plurking here.