450 likes | 467 Views
This presentation covers everything you need to know about npm. NPM is a package manager for the JavaScript programming language. It is the default package manager for Node.js. It consists of a database of both public and privately managed libraries that we can all implement in our JavaScript applications as and when needed. Many popular libraries like React JS, Express JS are stored in the npm registry.<br><br>This Node.js training enables you to build network applications quickly and efficiently using JavaScript. The Node.js certification training course is designed to help developers understand and build web applications with the help of JavaScript.<br><br>Node.js Training Key Features<br>1. 100% Money Back Guarantee<br>2. 36 hours of instructor-led online training<br>3. Three real-life, industry-based projects<br>4. 16 chapter-end quizzes<br>5. Master Node.js, Socket.io, Express.js with MongoDB, and SQLite<br>6. Flexibility to choose classes<br><br>Node.js Course Overview:<br>The Node. js certification training course helps you gain an in-depth knowledge of concepts such as Express.js, Node Packet Manager (NPM), shrink-wrap, NPM Vet, REST, Express.js with MongoDB, and SQLite CRUD operations. This Node.js training focuses on the essential concepts of Node.js and provides hands-on experience in building an HTTP server.<br><br>Eligibility:<br>This Node.js Certification Training is ideal for technical project managers, technical leads, full-stack web developers, quality analysts, architects, and students or aspiring professionals who wish to lead web development.<br><br>ud83dudc49Learn more at: https://bit.ly/2W6kBXN<br>
E N D
What’s in it for you? Node.js Modules
What’s in it for you? Node.js Modules What is NPM?
What’s in it for you? Node.js Modules What is NPM? Why NPM?
What’s in it for you? Node.js Modules What is NPM? Why NPM? NPM Installation
What’s in it for you? Node.js Modules What is NPM? Why NPM? NPM Installation Package.json File
What’s in it for you? Node.js Modules What is NPM? Why NPM? DEMO NPM Installation Package.json File
Node.js Modules • Modules in Node.js provide functionality that can be used throughout the Node.js application • Node.js has many modules to provide required functionality for a web application
Node.js Modules • Some of the popular modules are: • Express
Node.js Modules • Some of the popular modules are: • express • React
Node.js Modules • Some of the popular modules are: • express • react • Nodemon
What is NPM? • NPM stands for Node Package Manager
What is NPM? • NPM stands for Node Package Manager • NPM is responsible for managing all the packages and modules for Node.js
What is NPM? • Node Package Manager provides two main functionalities: • It provides online repositories for node.js packages/modules which are searchable on search.nodejs.org
What is NPM? • Node Package Manager provides two main functionalities: • It provides online repositories for node.js packages/modules which are searchable on search.nodejs.org • It also provides command line utility to install Node.js packages, does version management and dependency management of Node.js packages
Why NPM? • Helps in adding the required packages into a project
Why NPM? • Helps in adding the required packages into a project • Manages and maintains various versions of codes and their dependencies
Why NPM? • Helps in adding the required packages into a project • Manages and maintains various versions of codes and their dependencies • NPM automatically updates the application when the project code undergoes any change
NPM Installation • Node Package Manager is included with the installation of Node.js
NPM Installation • Download Node.js from https://nodejs.org/en/download/
NPM Installation • Download Node.js from https://nodejs.org/en/download/ • Run the downloaded Node.js installer and accept the default settings
NPM Installation • Download Node.js from https://nodejs.org/en/download/ • Run the downloaded Node.js installer and accept the default settings • Verify if Node.js is properly installed using command prompt: node --version
NPM Installation • Download Node.js from https://nodejs.org/en/download/ • Run the downloaded Node.js installer and accept the default settings • Verify if Node.js is properly installed using command prompt: node --version • NPM gets installed alongside, verify if it is properly installed using command prompt: npm --version
Package.json File • The package.jsonfile is the heart of a Node.js system
Package.json File • The package.jsonfile is the heart of a Node.js system • This file holds the metadata about a particular project
Package.json File • The package.jsonfile is the heart of a Node.js system • This file holds the metadata about a particular project • package.json is present in the root directory of any Node application or module
Package.json File • The package.jsonfile is the heart of a Node.js system • package.json holds the metadata about a particular project • package.json is present in the root directory of any Node application or module • package.json provides the Node package manager with the necessary information to understand how the project should be handled along with its dependencies.
Package.json File { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } • package.json file after creating a Node.js project using the command: npminit package.json
Package.json File { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } • package.json file after creating a Node.js project using the command: npminit • You can edit these parameters at the time of creation of a Node.js project package.json
Package.json File Name of your project { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } • package.json file after creating a Node.js project using the command: npminit • You can edit these parameters at the time of creation of a Node.js project package.json
Package.json File Version of your project { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } • This is how a package.json file looks like immediately after creating a Node.js project using the command: npminit • You can edit these parameters at the time of creation of a Node.js project package.json
Package.json File { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } Description of your project • package.json file after creating a Node.js project using the command: npminit • You can edit these parameters at the time of creation of a Node.js project package.json
Package.json File { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } • This is how a package.json file looks like immediately after creating a Node.js project using the command: npminit • You can edit these parameters at the time of creation of a Node.js project Main JavaScript file of your project package.json
Package.json File { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } • package.json file after creating a Node.js project using the command: npminit • You can edit these parameters at the time of creation of a Node.js project Author of your project package.json
Package.json File { "name": "node-npm", "version": "1.0.0", "description": "A demo application", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Taha", "license": "ISC" } • package.json file after creating a Node.js project using the command: npminit • You can edit these parameters at the time of creation of a Node.js project License of your project package.json
DEMO DEMO