DEV Community

Cover image for Day 17 –  NPM (Node Package Manager) - Learning Node JS In 30 Days [Mini series]
Muhammad Ali (Nerdjfpb)
Muhammad Ali (Nerdjfpb)

Posted on • Originally published at

Day 17 – NPM (Node Package Manager) - Learning Node JS In 30 Days [Mini series]

NPM is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript run-time environment Node.js. (Wikipedia)

Understand anything ?

A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer’s operating system in a consistent manner. (Wikipedia)

So basically npm is a system what we can use to do different things with our code base to manage properly -

Alt Text

Now it's time to use npm. We can start configure a project using npm init.
It will prompt up some question and most basically we are going to say yes to them.
So shortcut way is just add -yes after everything. like - npm init -yes

Alt Text

Now we'll see there is a new file call package.json. In package.json we can see all the data about the npm created for us. Now we're ready to use npm.

Alt Text

We are going to use express-js(node js framework) for further tutorials. Now let's install it now current project.

Honestly it's so easy. Just use the cmd and type npm install express

Alt Text

Check the package.json file.

Alt Text

Wow!!! You've installed a package using npm!

You can see the graphical version here

Originally it published on nerdjfpbblog. You can connect with me in twitter or linkedin !

You can read the old posts from this series (below)

Top comments (0)