SlideShare a Scribd company logo
3
Most read
4
Most read
8
Most read
Node.js
BUILD real time Web Application Development
Objectives
Introduction to Node.js
What is NPM
Express framework in Node.js
How to create API
MongoDB Configuration
At the end of the session you will be able to learn:
Introduction to node.js
 Node.js is an open source , cross platform runtime environment for server-side and
networking applications
 Node.js applications are written in JavaScript, and can be run within the Node.js
runtime on OS X, Microsoft Windows, Linux, etc – Wikipedia
 This is based on Google ‘s V8 Javascript Engine
What is Node.js
 It is SINGLE THREADED
 No Worries about : race conditions , deadlocks and other problems that go with
MultiThreading.
 Almost no function in Node directly perform I/O, so the process never blocks. Because
nothing blocks, less-than-expert programmers are able to develop scalable systems.
EVENT LOOP
NETWORK
FILE SYSTEM
PROCESS
OTHER
THREAD POOLEVENT QUEUE
Basics of Node.js : npm
 NPM stands for Node Package Manager.
 npm is a registry of reusable modules and packages written by various developers
 You can publish your own packages
 There are two ways to install npm packages:
 Locally: To use and depend on the package from your own module or project
 Globally: To use across the system, like a command line tool
 Installing a package locally:
 The package is easily downloaded by just running “npm install <package name>”
 This will create a node_modules directory (If it doesnot exist yet) and will download the
package there.
 Once installed you can use it in any js file of your project by saying: var obj =
require(‘<package name>’);
Express Framework
 Express is a web application framework which provides a robust set of features for web and
mobile applications
 It is open source designed for building web application and APIs
 It is a server framework for Node.js
 It is backend part of MEAN Stack together with MongoDB, database and Angular JS frontend.
 Creating robust API is quick and easy
 It provides a thin layer of fundamental web application feature
 It offers a simple way to get a server up and running
 Features:
 Router
 Middleware
 Template Engine
 Error Handling
Express : Simple Application Example
Var express = require(‘express’);
Var app = express();
app.listen(9000, function(){
Console.log(‘Server listening to port 9000’);
})
app.get(‘/getUsers’, function(req,res){
res.json({‘message’:’data from getUsers’});
})
Connecting MongoDB with Node.js
 MongoDB has rapidly grown to become a popular database for web application
and is perfect fit for Node.JS applications
 We have lot of third party modules to connect to MongoDB
 Mongoose
 MongoDB
 MongoClient
 First we have to establish a connection between node app and MongoDB
 Once connection is establish, fire the query to perform a crud operation
var mongoose = require(‘mongoose’);
//Middleware
mongoose.connect(‘mongodb://localhost:2701/userManagement’);

More Related Content

What's hot (20)

PPTX
Introduction Node.js
Erik van Appeldoorn
 
PPTX
Introduction to node.js
Dinesh U
 
PPTX
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
PDF
Nodejs presentation
Arvind Devaraj
 
PDF
Introduction to Node.js
Rob O'Doherty
 
PPTX
Reactjs
Neha Sharma
 
PPTX
Node js introduction
Joseph de Castelnau
 
PPTX
What Is Express JS?
Simplilearn
 
PPTX
Node.js Express
Eyal Vardi
 
PDF
Node js (runtime environment + js library) platform
Sreenivas Kappala
 
PPTX
Introduction to React
Rob Quick
 
PPTX
Introduction to Node.js
Vikash Singh
 
PPTX
NodeJS - Server Side JS
Ganesh Kondal
 
PPTX
Intro to React
Justin Reock
 
PPT
Node.js Basics
TheCreativedev Blog
 
PPTX
Node js
Fatih Şimşek
 
PPTX
Intro to Node.js (v1)
Chris Cowan
 
PDF
Vue.js
Jadson Santos
 
PPTX
React workshop
Imran Sayed
 
PPTX
Introduction to laravel framework
Ahmad Fatoni
 
Introduction Node.js
Erik van Appeldoorn
 
Introduction to node.js
Dinesh U
 
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
Nodejs presentation
Arvind Devaraj
 
Introduction to Node.js
Rob O'Doherty
 
Reactjs
Neha Sharma
 
Node js introduction
Joseph de Castelnau
 
What Is Express JS?
Simplilearn
 
Node.js Express
Eyal Vardi
 
Node js (runtime environment + js library) platform
Sreenivas Kappala
 
Introduction to React
Rob Quick
 
Introduction to Node.js
Vikash Singh
 
NodeJS - Server Side JS
Ganesh Kondal
 
Intro to React
Justin Reock
 
Node.js Basics
TheCreativedev Blog
 
Intro to Node.js (v1)
Chris Cowan
 
React workshop
Imran Sayed
 
Introduction to laravel framework
Ahmad Fatoni
 

Similar to Node js Introduction (20)

PDF
Basic API Creation with Node.JS
Azilen Technologies Pvt. Ltd.
 
PDF
An introduction to Node.js
Kasey McCurdy
 
PPTX
What is Mean Stack Development ?
Balajihope
 
PPTX
Introduction to node.js
Md. Sohel Rana
 
PPTX
Intro to node and mongodb 1
Mohammad Qureshi
 
PPTX
Node js installation steps.pptx slide share ppts
HemaSenthil5
 
PPTX
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
PPTX
Introduction to Node.js
Winston Hsieh
 
PPTX
Intro To Node.js
Chris Cowan
 
PPTX
mern _stack _power _point_ presentation(1)
susmithalanka2
 
PPTX
Building Applications With the MEAN Stack
Nir Noy
 
PPTX
module for backend full stack applications 1.pptx
hemalathas752360
 
PPTX
Seminar report based on Mern stack web technology
Mm071
 
PPTX
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
PPTX
Node.js & Express.js Unleashed
Elewayte
 
PPT
Node js
Chirag Parmar
 
PPTX
mearn-stack-new_ccvbhbhvgvgcdszsxdxfcf.pptx
aravym456
 
PPTX
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
PPTX
Nodejs
Bhushan Patil
 
PDF
Hello world - intro to node js
Refresh Annapolis Valley
 
Basic API Creation with Node.JS
Azilen Technologies Pvt. Ltd.
 
An introduction to Node.js
Kasey McCurdy
 
What is Mean Stack Development ?
Balajihope
 
Introduction to node.js
Md. Sohel Rana
 
Intro to node and mongodb 1
Mohammad Qureshi
 
Node js installation steps.pptx slide share ppts
HemaSenthil5
 
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
Introduction to Node.js
Winston Hsieh
 
Intro To Node.js
Chris Cowan
 
mern _stack _power _point_ presentation(1)
susmithalanka2
 
Building Applications With the MEAN Stack
Nir Noy
 
module for backend full stack applications 1.pptx
hemalathas752360
 
Seminar report based on Mern stack web technology
Mm071
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
Node.js & Express.js Unleashed
Elewayte
 
Node js
Chirag Parmar
 
mearn-stack-new_ccvbhbhvgvgcdszsxdxfcf.pptx
aravym456
 
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
Hello world - intro to node js
Refresh Annapolis Valley
 
Ad

More from sanskriti agarwal (8)

PPTX
Spring aop
sanskriti agarwal
 
PPTX
Spring 5
sanskriti agarwal
 
PPTX
Future plans ways to recover
sanskriti agarwal
 
DOCX
COVID -19 PRESENT & FUTURE
sanskriti agarwal
 
PPTX
Node js Global Packages
sanskriti agarwal
 
PPTX
Introduction to Salesforce Platform - Basic
sanskriti agarwal
 
PPTX
Lightning Process Builder
sanskriti agarwal
 
PPTX
Lightning Process Builder
sanskriti agarwal
 
Spring aop
sanskriti agarwal
 
Future plans ways to recover
sanskriti agarwal
 
COVID -19 PRESENT & FUTURE
sanskriti agarwal
 
Node js Global Packages
sanskriti agarwal
 
Introduction to Salesforce Platform - Basic
sanskriti agarwal
 
Lightning Process Builder
sanskriti agarwal
 
Lightning Process Builder
sanskriti agarwal
 
Ad

Recently uploaded (20)

PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Python basic programing language for automation
DanialHabibi2
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 

Node js Introduction

  • 1. Node.js BUILD real time Web Application Development
  • 2. Objectives Introduction to Node.js What is NPM Express framework in Node.js How to create API MongoDB Configuration At the end of the session you will be able to learn:
  • 3. Introduction to node.js  Node.js is an open source , cross platform runtime environment for server-side and networking applications  Node.js applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft Windows, Linux, etc – Wikipedia  This is based on Google ‘s V8 Javascript Engine
  • 4. What is Node.js  It is SINGLE THREADED  No Worries about : race conditions , deadlocks and other problems that go with MultiThreading.  Almost no function in Node directly perform I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop scalable systems. EVENT LOOP NETWORK FILE SYSTEM PROCESS OTHER THREAD POOLEVENT QUEUE
  • 5. Basics of Node.js : npm  NPM stands for Node Package Manager.  npm is a registry of reusable modules and packages written by various developers  You can publish your own packages  There are two ways to install npm packages:  Locally: To use and depend on the package from your own module or project  Globally: To use across the system, like a command line tool  Installing a package locally:  The package is easily downloaded by just running “npm install <package name>”  This will create a node_modules directory (If it doesnot exist yet) and will download the package there.  Once installed you can use it in any js file of your project by saying: var obj = require(‘<package name>’);
  • 6. Express Framework  Express is a web application framework which provides a robust set of features for web and mobile applications  It is open source designed for building web application and APIs  It is a server framework for Node.js  It is backend part of MEAN Stack together with MongoDB, database and Angular JS frontend.  Creating robust API is quick and easy  It provides a thin layer of fundamental web application feature  It offers a simple way to get a server up and running  Features:  Router  Middleware  Template Engine  Error Handling
  • 7. Express : Simple Application Example Var express = require(‘express’); Var app = express(); app.listen(9000, function(){ Console.log(‘Server listening to port 9000’); }) app.get(‘/getUsers’, function(req,res){ res.json({‘message’:’data from getUsers’}); })
  • 8. Connecting MongoDB with Node.js  MongoDB has rapidly grown to become a popular database for web application and is perfect fit for Node.JS applications  We have lot of third party modules to connect to MongoDB  Mongoose  MongoDB  MongoClient  First we have to establish a connection between node app and MongoDB  Once connection is establish, fire the query to perform a crud operation var mongoose = require(‘mongoose’); //Middleware mongoose.connect(‘mongodb://localhost:2701/userManagement’);