SlideShare a Scribd company logo
iFour ConsultancyNode Package Manager
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 NPM is a package manager for the JavaScript programming language. It is the
default package manager for the JavaScript runtime environment Node.js. It
consists of a command line client, also called npm, and an online database of public
and paid-for private packages, called the npm registry. The registry is accessed via
the client, and the available packages can be browsed and searched via the npm
website. The package manager and the registry are managed by npm, Inc.
 NPM is included as a recommended feature in Node.js installer.npm consists of a
command line client that interacts with a remote registry. It allows users to
consume and distribute JavaScript modules that are available on the registry.
Introduction
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 NPM is the world's largest Software Library (Registry).
 NPM is also a software Package Manager and Installer.
 The registry contains over 800,000 code packages.
 Open-source developers use npm to share software.
 Many organizations also use npm to manage private development.
What is NPM?
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 npm is a package manager for Node.js with hundreds of thousands of packages.
Although it does create some of your directory structure/organization, this is not
the main purpose.
 The main goal, as you touched upon, is automated dependency and package
management. This means that you can specify all of your project's dependencies
inside your package.json file, then any time you (or anyone else) needs to get
started with your project they can just run npm install and immediately have all of
the dependencies installed. On top of this, it is also possible to specify what
versions your project depends upon to prevent updates from breaking your project.
Node Package Manager
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 It is definitely possible to manually download your libraries, copy them into the
correct directories, and use them that way. However, as your project (and list of
dependencies) grows, this will quickly become time-consuming and messy. It also
makes collaborating and sharing your project that much more difficult.
 Hopefully this makes it more clear what the purpose of npm is. As a Javascript
developer (both client-side and server-side), npm is an indispensable tool in my
workflow.
 npm is free to use.
 You can download all npm public software packages without any registration or
logon.
Node Package Manager
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 npm includes a CLI (Command Line Client) that can be used to download and install
software:
Installing NPM
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
Software Package Manager
 The name npm (Node Package Manager) stems from when npm first was created as
a package manager for Node.js.
 npm is installed with Node.js
 All npm packages are defined in files called package.json.
 The content of package.json must be written in JSON.
 At least two fields must be present in the definition file: name and version.
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
Package.Json
 How to generate package.json file.
 Here is Package.Json file:
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 name − name of the package
 version − version of the package
 description − description of the package
 homepage − homepage of the package
 author − author of the package
 contributors − name of the contributors to the package
 dependencies − list of dependencies. NPM automatically installs all the dependencies
mentioned here in the node_module folder of the package.
 repository − repository type and URL of the package
 main − entry point of the package
 keywords − keywords
Attributes of Package.json
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
Installing Packages
There is a simple syntax to install any Node.js module −
syntex:
$ npm install <Module Name>
 For example, following is the command to install a famous Node.js web framework
module called express
$ npm install express
We have two ways to install package.
1. Install package local
2. Install package global
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
By default, NPM installs any dependency in the local mode. Here local mode refers
to the package installation in node_modules directory lying in the folder where
Node application is present. Locally deployed packages are accessible via require()
method. For example, when we installed express module, it created node_modules
directory in the current directory where it installed the express module.
local packages are installed in the directory where you run npm install <package-
name>, and they are put in the node_modules folder under this directory.
For example:
$ npm install express
Install package local
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 Globally installed packages/dependencies are stored in system directory. Such
dependencies can be used in CLI (Command Line Interface) function of any node.js
but cannot be imported using require() in Node application directly. Now let's try
installing the express module using global installation.
 For example:
$ npm install express -g
Install package global
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
Adding dependency
 Adding dependency in package.json:
 For example:
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
Adding dependency
 Here is Package.Json file:
 express dependency (package) we add into package.json file
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
Update Package:
 Update package.json and change the version of the dependency to be updated and
run the following command.
 For example:
$ npm update express
Search a package:
 Search a package name using NPM.
 For example:
$ npm search express
Updating packages
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 Nodemon is a utility that will monitor for any changes in your source and
automatically restart your server. Perfect for Nodejs development. Install it using
npm.
 Just use nodemon instead of node to run your code, and now your process will
automatically restart when your code changes. To install, get node.js, then from
your terminal run:
 npm install -g nodemon
Installing Nodemon
https://www.ifourtechnolab.com/nodejs-blockchain-software-development
 Automatic restarting of application.
 Detects default file extension to monitor.
 Default support for node & coffeescript, but easy to run any executable (such as
python, make, etc).
 Ignoring specific files or directories.
 Watch specific directories.
 Works with server applications or one time run utilities and REPLs.
 Requirable in node apps.
 Open source and available on github.
Features of Nodemon
https://www.ifourtechnolab.com/nodejs-blockchain-software-development

More Related Content

What's hot

Introduction to NPM and building CLI Tools with Node.js
Introduction to NPM and building CLI Tools with Node.jsIntroduction to NPM and building CLI Tools with Node.js
Introduction to NPM and building CLI Tools with Node.js
Suroor Wijdan
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
Express js
Express jsExpress js
Express js
Manav Prasad
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
Eyal Vardi
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
AMD Developer Central
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
Dinesh U
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
 
Angular 4 and TypeScript
Angular 4 and TypeScriptAngular 4 and TypeScript
Angular 4 and TypeScript
Ahmed El-Kady
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
Amit Baghel
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
Cere Labs Pvt. Ltd
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Malla Reddy University
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Rob O'Doherty
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
Arjun Sreekumar
 
NPM.pdf
NPM.pdfNPM.pdf
NPM.pdf
Bareen Shaikh
 
Spring Boot
Spring BootSpring Boot
Spring Boot
HongSeong Jeon
 
Angular overview
Angular overviewAngular overview
Angular overview
Thanvilahari
 
Tomcat server
 Tomcat server Tomcat server
Tomcat server
Utkarsh Agarwal
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
sanskriti agarwal
 
React JS
React JSReact JS

What's hot (20)

Introduction to NPM and building CLI Tools with Node.js
Introduction to NPM and building CLI Tools with Node.jsIntroduction to NPM and building CLI Tools with Node.js
Introduction to NPM and building CLI Tools with Node.js
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Express js
Express jsExpress js
Express js
 
Node ppt
Node pptNode ppt
Node ppt
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Angular 4 and TypeScript
Angular 4 and TypeScriptAngular 4 and TypeScript
Angular 4 and TypeScript
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
 
NPM.pdf
NPM.pdfNPM.pdf
NPM.pdf
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Angular overview
Angular overviewAngular overview
Angular overview
 
Tomcat server
 Tomcat server Tomcat server
Tomcat server
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
React JS
React JSReact JS
React JS
 

Similar to An Introduction of Node Package Manager (NPM)

Node JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applicationsNode JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applications
Expeed Software
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
Jacob Nelson
 
Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...
JEEVANANTHAMG6
 
Mastering node.js, part 1 - introduction
Mastering node.js, part 1 - introductionMastering node.js, part 1 - introduction
Mastering node.js, part 1 - introduction
cNguyn826690
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
Adam Englander
 
How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?
Inexture Solutions
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
Inexture Solutions
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
Ahmed Assaf
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
vjvarenya
 
NodeJs Session03
NodeJs Session03NodeJs Session03
NodeJs Session03
Jainul Musani
 
Anton Cherednikov "Modules and Artifacts in NPM"
Anton Cherednikov "Modules and Artifacts in NPM"Anton Cherednikov "Modules and Artifacts in NPM"
Anton Cherednikov "Modules and Artifacts in NPM"
LogeekNightUkraine
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package manager
Timur Safin
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
Ansuman Roy
 
Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)
Rohit Singh
 
Composer namespacing
Composer namespacingComposer namespacing
Composer namespacing
Deepak Chandani
 
S&T What I know about Node 110817
S&T What I know about Node 110817S&T What I know about Node 110817
S&T What I know about Node 110817
Dan Dineen
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with ComposerJason Grimes
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
David Ashton
 

Similar to An Introduction of Node Package Manager (NPM) (20)

Node JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applicationsNode JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applications
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...
 
Mastering node.js, part 1 - introduction
Mastering node.js, part 1 - introductionMastering node.js, part 1 - introduction
Mastering node.js, part 1 - introduction
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
 
How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
 
NodeJs Session03
NodeJs Session03NodeJs Session03
NodeJs Session03
 
Anton Cherednikov "Modules and Artifacts in NPM"
Anton Cherednikov "Modules and Artifacts in NPM"Anton Cherednikov "Modules and Artifacts in NPM"
Anton Cherednikov "Modules and Artifacts in NPM"
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package manager
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
 
Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)
 
Composer namespacing
Composer namespacingComposer namespacing
Composer namespacing
 
S&T What I know about Node 110817
S&T What I know about Node 110817S&T What I know about Node 110817
S&T What I know about Node 110817
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with Composer
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
 
Node js
Node jsNode js
Node js
 

More from iFour Technolab Pvt. Ltd.

Software for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdfSoftware for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdf
iFour Technolab Pvt. Ltd.
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdf
iFour Technolab Pvt. Ltd.
 
iFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company ProfileiFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company Profile
iFour Technolab Pvt. Ltd.
 
Java9to19Final.pptx
Java9to19Final.pptxJava9to19Final.pptx
Java9to19Final.pptx
iFour Technolab Pvt. Ltd.
 
Meetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptxMeetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptx
iFour Technolab Pvt. Ltd.
 
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
iFour Technolab Pvt. Ltd.
 
NFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptxNFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptx
iFour Technolab Pvt. Ltd.
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour Technolab
iFour Technolab Pvt. Ltd.
 
ASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour TechnolabASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour Technolab
iFour Technolab Pvt. Ltd.
 
Basic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.jsBasic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.js
iFour Technolab Pvt. Ltd.
 
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour TechnolabBasic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
iFour Technolab Pvt. Ltd.
 
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
iFour Technolab Pvt. Ltd.
 
Tutorial on Node File System
Tutorial on Node File SystemTutorial on Node File System
Tutorial on Node File System
iFour Technolab Pvt. Ltd.
 
MongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutionMongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & Execution
iFour Technolab Pvt. Ltd.
 
Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)
iFour Technolab Pvt. Ltd.
 
Agile Project Management with Scrum PDF
Agile Project Management with Scrum PDFAgile Project Management with Scrum PDF
Agile Project Management with Scrum PDF
iFour Technolab Pvt. Ltd.
 
Understanding Agile Development with Scrum
Understanding Agile Development with ScrumUnderstanding Agile Development with Scrum
Understanding Agile Development with Scrum
iFour Technolab Pvt. Ltd.
 
Types of Non Functional Testing
Types of Non Functional TestingTypes of Non Functional Testing
Types of Non Functional Testing
iFour Technolab Pvt. Ltd.
 

More from iFour Technolab Pvt. Ltd. (20)

Software for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdfSoftware for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdf
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdf
 
iFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company ProfileiFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company Profile
 
Java9to19Final.pptx
Java9to19Final.pptxJava9to19Final.pptx
Java9to19Final.pptx
 
Meetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptxMeetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptx
 
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
 
NFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptxNFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptx
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour Technolab
 
ASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour TechnolabASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour Technolab
 
Basic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.jsBasic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.js
 
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour TechnolabBasic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
 
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
 
Tutorial on Node File System
Tutorial on Node File SystemTutorial on Node File System
Tutorial on Node File System
 
MongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutionMongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & Execution
 
Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)
 
Agile Project Management with Scrum PDF
Agile Project Management with Scrum PDFAgile Project Management with Scrum PDF
Agile Project Management with Scrum PDF
 
Understanding Agile Development with Scrum
Understanding Agile Development with ScrumUnderstanding Agile Development with Scrum
Understanding Agile Development with Scrum
 
Types of Non Functional Testing
Types of Non Functional TestingTypes of Non Functional Testing
Types of Non Functional Testing
 

Recently uploaded

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 

Recently uploaded (20)

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 

An Introduction of Node Package Manager (NPM)

  • 1. iFour ConsultancyNode Package Manager https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 2.  NPM is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry. The registry is accessed via the client, and the available packages can be browsed and searched via the npm website. The package manager and the registry are managed by npm, Inc.  NPM is included as a recommended feature in Node.js installer.npm consists of a command line client that interacts with a remote registry. It allows users to consume and distribute JavaScript modules that are available on the registry. Introduction https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 3.  NPM is the world's largest Software Library (Registry).  NPM is also a software Package Manager and Installer.  The registry contains over 800,000 code packages.  Open-source developers use npm to share software.  Many organizations also use npm to manage private development. What is NPM? https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 4.  npm is a package manager for Node.js with hundreds of thousands of packages. Although it does create some of your directory structure/organization, this is not the main purpose.  The main goal, as you touched upon, is automated dependency and package management. This means that you can specify all of your project's dependencies inside your package.json file, then any time you (or anyone else) needs to get started with your project they can just run npm install and immediately have all of the dependencies installed. On top of this, it is also possible to specify what versions your project depends upon to prevent updates from breaking your project. Node Package Manager https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 5.  It is definitely possible to manually download your libraries, copy them into the correct directories, and use them that way. However, as your project (and list of dependencies) grows, this will quickly become time-consuming and messy. It also makes collaborating and sharing your project that much more difficult.  Hopefully this makes it more clear what the purpose of npm is. As a Javascript developer (both client-side and server-side), npm is an indispensable tool in my workflow.  npm is free to use.  You can download all npm public software packages without any registration or logon. Node Package Manager https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 6.  npm includes a CLI (Command Line Client) that can be used to download and install software: Installing NPM https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 7. Software Package Manager  The name npm (Node Package Manager) stems from when npm first was created as a package manager for Node.js.  npm is installed with Node.js  All npm packages are defined in files called package.json.  The content of package.json must be written in JSON.  At least two fields must be present in the definition file: name and version. https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 8. Package.Json  How to generate package.json file.  Here is Package.Json file: https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 9.  name − name of the package  version − version of the package  description − description of the package  homepage − homepage of the package  author − author of the package  contributors − name of the contributors to the package  dependencies − list of dependencies. NPM automatically installs all the dependencies mentioned here in the node_module folder of the package.  repository − repository type and URL of the package  main − entry point of the package  keywords − keywords Attributes of Package.json https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 10. Installing Packages There is a simple syntax to install any Node.js module − syntex: $ npm install <Module Name>  For example, following is the command to install a famous Node.js web framework module called express $ npm install express We have two ways to install package. 1. Install package local 2. Install package global https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 11. By default, NPM installs any dependency in the local mode. Here local mode refers to the package installation in node_modules directory lying in the folder where Node application is present. Locally deployed packages are accessible via require() method. For example, when we installed express module, it created node_modules directory in the current directory where it installed the express module. local packages are installed in the directory where you run npm install <package- name>, and they are put in the node_modules folder under this directory. For example: $ npm install express Install package local https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 12.  Globally installed packages/dependencies are stored in system directory. Such dependencies can be used in CLI (Command Line Interface) function of any node.js but cannot be imported using require() in Node application directly. Now let's try installing the express module using global installation.  For example: $ npm install express -g Install package global https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 13. Adding dependency  Adding dependency in package.json:  For example: https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 14. Adding dependency  Here is Package.Json file:  express dependency (package) we add into package.json file https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 15. Update Package:  Update package.json and change the version of the dependency to be updated and run the following command.  For example: $ npm update express Search a package:  Search a package name using NPM.  For example: $ npm search express Updating packages https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 16.  Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for Nodejs development. Install it using npm.  Just use nodemon instead of node to run your code, and now your process will automatically restart when your code changes. To install, get node.js, then from your terminal run:  npm install -g nodemon Installing Nodemon https://www.ifourtechnolab.com/nodejs-blockchain-software-development
  • 17.  Automatic restarting of application.  Detects default file extension to monitor.  Default support for node & coffeescript, but easy to run any executable (such as python, make, etc).  Ignoring specific files or directories.  Watch specific directories.  Works with server applications or one time run utilities and REPLs.  Requirable in node apps.  Open source and available on github. Features of Nodemon https://www.ifourtechnolab.com/nodejs-blockchain-software-development