Day 17 –  NPM (Node Package Manager) - Learning Node JS In 30 Days [Mini series]
Tags: node, javascript, codenewbie
Published: 2019-12-20 19:41:04

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 - https://www.npmjs.com/

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/8sjg0izw5c0pcvh6f65z.png)

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](https://thepracticaldev.s3.amazonaws.com/i/fc8nydz94n5hphblt60z.png)

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](https://thepracticaldev.s3.amazonaws.com/i/xv9qgzvvc6pql9wzpqaa.png)

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](https://thepracticaldev.s3.amazonaws.com/i/56ouegbkgfafjdh854hr.png)

Check the `package.json` file.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2w7iowubuks17pbpckf6.png)

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


You can see the graphical version here
{% instagram B6Tj25LAY1Q %}

Originally it published on [nerdjfpbblog](https://blog.nerdjfpb.com/day17-nodejsin30days/). You can connect with me in [twitter](https://twitter.com/nerdjfpb) or [linkedin](https://www.linkedin.com/in/nerdjfpb/) !


###__You can read the old posts from this series (below)__

{% post nerdjfpb/day-1-learning-node-js-in-30-days-mini-series-55e7 %}

{% post nerdjfpb/day-2-learning-node-js-in-30-days-mini-series-5023 %}

{% post nerdjfpb/day-3-learning-node-js-in-30-days-mini-series-24i4 %}

{% post nerdjfpb/day-4-learning-node-js-in-30-days-mini-series-1koc %}

{% post nerdjfpb/day-5-learning-node-js-in-30-days-mini-series-21jm %}

{% post nerdjfpb/day-6-learning-node-js-in-30-days-mini-series-758 %}

{% post nerdjfpb/day-7-learning-node-js-in-30-days-mini-series-3023 %}

{% post nerdjfpb/day-8-var-vs-let-vs-const-learning-node-js-in-30-days-mini-series-1i72 %}

{% post nerdjfpb/day-9-mastering-eventemitter-learning-node-js-in-30-days-mini-series-2dfe %}

{% post nerdjfpb/day-10-mastering-eventemitter-learning-node-js-in-30-days-mini-series-2802 %}

{% post nerdjfpb/day-11-creating-and-deleting-folders-learning-node-js-in-30-days-mini-series-3a2d %}

{% post nerdjfpb/day-12-creating-own-server-learning-node-js-in-30-days-mini-series-3ef %}

{% post nerdjfpb/day-13-buffer-stream-learning-node-js-in-30-days-mini-series-5c5d %}

{% post nerdjfpb/day-14-serving-html-pages-learning-node-js-in-30-days-mini-series-2hl3 %}

{% post nerdjfpb/day-15-sending-json-to-client-learning-node-js-in-30-days-mini-series-21pc %}

{% post nerdjfpb/day-16-routing-basic-learning-node-js-in-30-days-mini-series-5hk6 %}