SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Firebase with Android and Beyond...
Introduction to Firebase with Android and Beyond...Introduction to Firebase with Android and Beyond...
Introduction to Firebase with Android and Beyond...Kasper Loevborg Jensen
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBhargav Anadkat
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash CourseHaim Michael
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...Edureka!
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Devang Garach
 
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...Edureka!
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS Ganesh Kondal
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - IntroductionWebStackAcademy
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 

Was ist angesagt? (20)

Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
NPM.pdf
NPM.pdfNPM.pdf
NPM.pdf
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Reactjs
Reactjs Reactjs
Reactjs
 
Node js
Node jsNode js
Node js
 
Introduction to Firebase with Android and Beyond...
Introduction to Firebase with Android and Beyond...Introduction to Firebase with Android and Beyond...
Introduction to Firebase with Android and Beyond...
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash Course
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
 
Node js crash course session 1
Node js crash course   session 1Node js crash course   session 1
Node js crash course session 1
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 

Ähnlich wie 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 applicationsExpeed Software
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JSJacob 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 - introductioncNguyn826690
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with ComposerAdam 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 MACInexture 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 AssafAhmed Assaf
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guidevjvarenya
 
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 managerTimur Safin
 
Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Angular Part 3 (Basic knowledge)
Angular Part 3 (Basic knowledge)Rohit Singh
 
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 110817Dan 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 #10David Ashton
 

Ähnlich wie 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
 

Mehr von 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.pdfiFour 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.pdfiFour 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 ProfileiFour 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.pptxiFour 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 2022iFour 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 TechnolabiFour 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 TechnolabiFour 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 TechnolabiFour 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.
 
MongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutionMongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutioniFour 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.
 

Mehr von 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
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Kürzlich hochgeladen (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

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