SlideShare a Scribd company logo
Workshop
@
Ramnshee Infotech
By Jainul Musani
SESSION:01
1
SESSION:01
Node.Js
 Node.js is a cross-platform runtime environment
 Node.js provide a library to run JavaScript applications
outside the browser.
 Node.js is used for creating server-side and networking
web applications.
 It is open source and free to use.
 It can be downloaded from this
link https://nodejs.org/en/
Node.js = Runtime Environment +
JavaScript Library
About Node.js
 Node.js uses
 Event-Driven,
Non-Blocking I/O model
Lightweight and Efficient,
 Perfect for Data-Intensive real-time applications
Run across distributed devices
Node.js is a platform built on Chrome's JavaScript
runtime
easily building fast and scalable network
applications.
SESSION:01
Traditional Web Server Model
SESSION:01
Nodejs Process Model
SESSION:01
Different Parts of Node.js
SESSION:01
Features of Node.js
 1) Extremely fast:
 2) I/O is Asynchronous and Event Driven:
 3) Single threaded:
 4) Highly Scalable:
 5) No buffering:
 6) Open source:
 7) License: under the MIT license.
SESSION:01
Installation of Node.js
SESSION:01
Start with Node.js CLI
SESSION:01
 C:UsersJainul>node
Welcome to Node.js v12.17.0.
Type ".help" for more information.
> _
 > console.log("Good Morning...!!!")
Good Morning...!!!
undefined
Simple Commands with Node.js
 Create a .js file “node1.js”
 Write basic commands of Js and save the file.
Console.log(“Testing”);
Console.log(“Good Morning…!!!”);
 D:UsersJamtemp>node node1.js (.js is optional)
Testing
Good Morning....!!!
 D:UsersJamtemp> _
SESSION:01
Node.js REPL
 Read
 Evaluate
 Print
 Loop
SESSION:01
How to start REPL – (Nodejs CLI)
 C:UsersJainul>node
Welcome to Node.js v12.17.0.
Type ".help" for more information.
> _
 > console.log("Good Morning...!!!")
Good Morning...!!!
undefined
SESSION:01
REPL commands and Features
 Press Ctrl+C to terminate the current command.
Pressing Ctrl + C twice causes the REPL to quit.
Press Ctrl+D to exit the REPL.
 Pressing up and down arrow keys you can see command
history and modify previous commands.
 Press tab key to see the list of current commands. If you
type a single character followed by tab it will show the
list of keywords, functions, and variables starting with
that particular character.
 The REPL can handle multiline expression.
 The REPL provides a special variable _ (underscore)
which is used to pull the result of the last expression.
SESSION:01
REPL commands and Features
> 1+2
3
> 1+2-3
0
> 1+(3-2)*4/2
3
>
SESSION:01
REPL commands and Features
> var x = 10;
undefined
> var y = 20;
undefined
> x+y
30
> console.log(x+y);
30
undefined
>
SESSION:01
Node.js Underscore _ variable
 To get last result use underscore _ variable
> console.clear()
> a = 10
> b = 15
> a+b
25
> console.log(“last sum is: “ + _+5);
last sum is 30
>
SESSION:01
Node.js Loop structure ‘do-while’
 Loop Structure in
Node.js
> var a = 10
undefined
> i = 1
1
> do{
... console.log(i)
... i++;
... }while(i<a);
SESSION:01
>
1
2
3
4
5
6
7
8
9
>
Output:
Node.js Primitive Data Types
 Node.js includes following primitive types:
• String
• Number
• Boolean
• Undefined
• Null
• RegExp
 Everything else is an object in Node.js.
SESSION:01
Node.js Data Types
 Loose Typing
• JavaScript in Node.js supports loose typing like
the browser's JavaScript.
• Use var keyword to declare a variable of any
type.
• Object Literal
var obj = {
authorName: 'Raxit Dilhan',
language: 'Node.js'
}
SESSION:01
Function in NodeJs
File name: func1.js
function display(){
console.log("Function 1");
}
function dispPara(x){
console.log("Function with Para : ", x);
}
display();
dispPara(10);
SESSION:01
Buffer in NodeJs
 Node.js includes an additional data type
called Buffer (not available in browser's
JavaScript).
 Buffer is mainly used to store binary data,
while reading from a file or receiving packets
over the network.
SESSION:01
process object in NodeJs
Each Node.js script runs in a process.
It includes process object to get all the
information about the current process of
Node.js application.
SESSION:01
Defaults to local in NodeJs
Nodejs JavaScript is different from
browser's JavaScript when it comes to
global scope.
In the browser's JavaScript, variables
declared without var keyword become
global.
In Node.js, everything becomes local by
default.
SESSION:01
Access Global Scope in NodeJs
In a browser, global scope is the window
object. In Node.js, global object represents
the global scope.
To add something in global scope, you need
to export it using export or module.export.
The same way, import modules/object using
require() function to access it from the
global scope.
For example, to export an object in
Node.js, use exports.name = object.
SESSION:01
Access Global Scope in NodeJs
exports.mylib = {
 sum: function(a,b) {
 console.log(“Sum = “, a+b);
 },
 greet: function(msg) {
 console.log(“Hello…”, msg);
 }
}
SESSION:01
Ad

More Related Content

What's hot (20)

NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
Chris Cowan
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
Joseph de Castelnau
 
Nodejs vatsal shah
Nodejs vatsal shahNodejs vatsal shah
Nodejs vatsal shah
Vatsal N Shah
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
Ahmed rebai
 
Express node js
Express node jsExpress node js
Express node js
Yashprit Singh
 
Nodejs functions & modules
Nodejs functions & modulesNodejs functions & modules
Nodejs functions & modules
monikadeshmane
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
Cere Labs Pvt. Ltd
 
React js basics
React js basicsReact js basics
React js basics
Maulik Shah
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
Eyal Vardi
 
IIS 7.0 Architecture And Integration With Asp.Net
IIS 7.0 Architecture And Integration With Asp.NetIIS 7.0 Architecture And Integration With Asp.Net
IIS 7.0 Architecture And Integration With Asp.Net
Manny Siddiqui MCS, MBA, PMP
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace IT
namespaceit
 
What Is Express JS?
What Is Express JS?What Is Express JS?
What Is Express JS?
Simplilearn
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JS
Cakra Danu Sedayu
 
React js
React jsReact js
React js
Rajesh Kolla
 
Node js overview
Node js overviewNode js overview
Node js overview
Eyal Vardi
 
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
 
Expressjs
ExpressjsExpressjs
Expressjs
Yauheni Nikanovich
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
Chris Cowan
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
Ahmed rebai
 
Nodejs functions & modules
Nodejs functions & modulesNodejs functions & modules
Nodejs functions & modules
monikadeshmane
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
Eyal Vardi
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace IT
namespaceit
 
What Is Express JS?
What Is Express JS?What Is Express JS?
What Is Express JS?
Simplilearn
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JS
Cakra Danu Sedayu
 
Node js overview
Node js overviewNode js overview
Node js overview
Eyal Vardi
 
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
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 

Similar to Nodejs Session01 (20)

node.js.pptx
node.js.pptxnode.js.pptx
node.js.pptx
rani marri
 
unit 2 of Full stack web development subject
unit 2 of Full stack web development subjectunit 2 of Full stack web development subject
unit 2 of Full stack web development subject
JeneferAlan1
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
Enoch Joshua
 
Node js
Node jsNode js
Node js
Chirag Parmar
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
Edureka!
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
Edureka!
 
Nodejs
NodejsNodejs
Nodejs
Vinod Kumar Marupu
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
Van-Duyet Le
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
Mike Brevoort
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
actanimation
 
Node.js 101 with Rami Sayar
Node.js 101 with Rami SayarNode.js 101 with Rami Sayar
Node.js 101 with Rami Sayar
FITC
 
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
 
Node JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHatNode JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHat
Scholarhat
 
Proposal
ProposalProposal
Proposal
Constantine Priemski
 
Best node js course
Best node js courseBest node js course
Best node js course
bestonlinecoursescoupon
 
Node js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU GandhinagarNode js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU Gandhinagar
tirthuce22
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
Bhavin Shah
 
Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
Budh Ram Gurung
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
Hajime Tazaki
 
Top 30 Node.js interview questions
Top 30 Node.js interview questionsTop 30 Node.js interview questions
Top 30 Node.js interview questions
techievarsity
 
unit 2 of Full stack web development subject
unit 2 of Full stack web development subjectunit 2 of Full stack web development subject
unit 2 of Full stack web development subject
JeneferAlan1
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
Enoch Joshua
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
Edureka!
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
Edureka!
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
Van-Duyet Le
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
Mike Brevoort
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
actanimation
 
Node.js 101 with Rami Sayar
Node.js 101 with Rami SayarNode.js 101 with Rami Sayar
Node.js 101 with Rami Sayar
FITC
 
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
 
Node JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHatNode JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHat
Scholarhat
 
Node js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU GandhinagarNode js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU Gandhinagar
tirthuce22
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
Bhavin Shah
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
Hajime Tazaki
 
Top 30 Node.js interview questions
Top 30 Node.js interview questionsTop 30 Node.js interview questions
Top 30 Node.js interview questions
techievarsity
 
Ad

More from Jainul Musani (20)

Core Java Interface Concepts for BCA Studetns
Core Java Interface Concepts for BCA StudetnsCore Java Interface Concepts for BCA Studetns
Core Java Interface Concepts for BCA Studetns
Jainul Musani
 
Java Abstract and Final Class for BCA students
Java Abstract and Final Class for BCA studentsJava Abstract and Final Class for BCA students
Java Abstract and Final Class for BCA students
Jainul Musani
 
Java Collection Framework for BCA Students
Java Collection Framework for BCA StudentsJava Collection Framework for BCA Students
Java Collection Framework for BCA Students
Jainul Musani
 
Simple Calculator using JavaFx a part of Advance Java
Simple Calculator using JavaFx a part of Advance JavaSimple Calculator using JavaFx a part of Advance Java
Simple Calculator using JavaFx a part of Advance Java
Jainul Musani
 
JavaFx Introduction, Basic JavaFx Architecture
JavaFx Introduction, Basic JavaFx ArchitectureJavaFx Introduction, Basic JavaFx Architecture
JavaFx Introduction, Basic JavaFx Architecture
Jainul Musani
 
ASP.NET 2010, WebServices Full Example for BCA Students
ASP.NET 2010, WebServices Full Example for BCA StudentsASP.NET 2010, WebServices Full Example for BCA Students
ASP.NET 2010, WebServices Full Example for BCA Students
Jainul Musani
 
Palindrome Programme in PHP for BCA students
Palindrome Programme in PHP for BCA studentsPalindrome Programme in PHP for BCA students
Palindrome Programme in PHP for BCA students
Jainul Musani
 
Leap Year Program in PHP for BCA students
Leap Year Program in PHP for BCA studentsLeap Year Program in PHP for BCA students
Leap Year Program in PHP for BCA students
Jainul Musani
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Python: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - IntroductionPython: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - Introduction
Jainul Musani
 
Python a Versatile Programming Language - Introduction
Python a Versatile Programming Language - IntroductionPython a Versatile Programming Language - Introduction
Python a Versatile Programming Language - Introduction
Jainul Musani
 
React js t8 - inlinecss
React js   t8 - inlinecssReact js   t8 - inlinecss
React js t8 - inlinecss
Jainul Musani
 
React js t7 - forms-events
React js   t7 - forms-eventsReact js   t7 - forms-events
React js t7 - forms-events
Jainul Musani
 
React js t6 -lifecycle
React js   t6 -lifecycleReact js   t6 -lifecycle
React js t6 -lifecycle
Jainul Musani
 
React js t5 - state
React js   t5 - stateReact js   t5 - state
React js t5 - state
Jainul Musani
 
React js t4 - components
React js   t4 - componentsReact js   t4 - components
React js t4 - components
Jainul Musani
 
React js t3 - es6
React js   t3 - es6React js   t3 - es6
React js t3 - es6
Jainul Musani
 
React js t2 - jsx
React js   t2 - jsxReact js   t2 - jsx
React js t2 - jsx
Jainul Musani
 
React js t1 - introduction
React js   t1 - introductionReact js   t1 - introduction
React js t1 - introduction
Jainul Musani
 
ExpressJs Session01
ExpressJs Session01ExpressJs Session01
ExpressJs Session01
Jainul Musani
 
Core Java Interface Concepts for BCA Studetns
Core Java Interface Concepts for BCA StudetnsCore Java Interface Concepts for BCA Studetns
Core Java Interface Concepts for BCA Studetns
Jainul Musani
 
Java Abstract and Final Class for BCA students
Java Abstract and Final Class for BCA studentsJava Abstract and Final Class for BCA students
Java Abstract and Final Class for BCA students
Jainul Musani
 
Java Collection Framework for BCA Students
Java Collection Framework for BCA StudentsJava Collection Framework for BCA Students
Java Collection Framework for BCA Students
Jainul Musani
 
Simple Calculator using JavaFx a part of Advance Java
Simple Calculator using JavaFx a part of Advance JavaSimple Calculator using JavaFx a part of Advance Java
Simple Calculator using JavaFx a part of Advance Java
Jainul Musani
 
JavaFx Introduction, Basic JavaFx Architecture
JavaFx Introduction, Basic JavaFx ArchitectureJavaFx Introduction, Basic JavaFx Architecture
JavaFx Introduction, Basic JavaFx Architecture
Jainul Musani
 
ASP.NET 2010, WebServices Full Example for BCA Students
ASP.NET 2010, WebServices Full Example for BCA StudentsASP.NET 2010, WebServices Full Example for BCA Students
ASP.NET 2010, WebServices Full Example for BCA Students
Jainul Musani
 
Palindrome Programme in PHP for BCA students
Palindrome Programme in PHP for BCA studentsPalindrome Programme in PHP for BCA students
Palindrome Programme in PHP for BCA students
Jainul Musani
 
Leap Year Program in PHP for BCA students
Leap Year Program in PHP for BCA studentsLeap Year Program in PHP for BCA students
Leap Year Program in PHP for BCA students
Jainul Musani
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Python: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - IntroductionPython: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - Introduction
Jainul Musani
 
Python a Versatile Programming Language - Introduction
Python a Versatile Programming Language - IntroductionPython a Versatile Programming Language - Introduction
Python a Versatile Programming Language - Introduction
Jainul Musani
 
React js t8 - inlinecss
React js   t8 - inlinecssReact js   t8 - inlinecss
React js t8 - inlinecss
Jainul Musani
 
React js t7 - forms-events
React js   t7 - forms-eventsReact js   t7 - forms-events
React js t7 - forms-events
Jainul Musani
 
React js t6 -lifecycle
React js   t6 -lifecycleReact js   t6 -lifecycle
React js t6 -lifecycle
Jainul Musani
 
React js t4 - components
React js   t4 - componentsReact js   t4 - components
React js t4 - components
Jainul Musani
 
React js t1 - introduction
React js   t1 - introductionReact js   t1 - introduction
React js t1 - introduction
Jainul Musani
 
Ad

Recently uploaded (20)

AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 

Nodejs Session01

  • 2. SESSION:01 Node.Js  Node.js is a cross-platform runtime environment  Node.js provide a library to run JavaScript applications outside the browser.  Node.js is used for creating server-side and networking web applications.  It is open source and free to use.  It can be downloaded from this link https://nodejs.org/en/ Node.js = Runtime Environment + JavaScript Library
  • 3. About Node.js  Node.js uses  Event-Driven, Non-Blocking I/O model Lightweight and Efficient,  Perfect for Data-Intensive real-time applications Run across distributed devices Node.js is a platform built on Chrome's JavaScript runtime easily building fast and scalable network applications. SESSION:01
  • 4. Traditional Web Server Model SESSION:01
  • 6. Different Parts of Node.js SESSION:01
  • 7. Features of Node.js  1) Extremely fast:  2) I/O is Asynchronous and Event Driven:  3) Single threaded:  4) Highly Scalable:  5) No buffering:  6) Open source:  7) License: under the MIT license. SESSION:01
  • 9. Start with Node.js CLI SESSION:01  C:UsersJainul>node Welcome to Node.js v12.17.0. Type ".help" for more information. > _  > console.log("Good Morning...!!!") Good Morning...!!! undefined
  • 10. Simple Commands with Node.js  Create a .js file “node1.js”  Write basic commands of Js and save the file. Console.log(“Testing”); Console.log(“Good Morning…!!!”);  D:UsersJamtemp>node node1.js (.js is optional) Testing Good Morning....!!!  D:UsersJamtemp> _ SESSION:01
  • 11. Node.js REPL  Read  Evaluate  Print  Loop SESSION:01
  • 12. How to start REPL – (Nodejs CLI)  C:UsersJainul>node Welcome to Node.js v12.17.0. Type ".help" for more information. > _  > console.log("Good Morning...!!!") Good Morning...!!! undefined SESSION:01
  • 13. REPL commands and Features  Press Ctrl+C to terminate the current command. Pressing Ctrl + C twice causes the REPL to quit. Press Ctrl+D to exit the REPL.  Pressing up and down arrow keys you can see command history and modify previous commands.  Press tab key to see the list of current commands. If you type a single character followed by tab it will show the list of keywords, functions, and variables starting with that particular character.  The REPL can handle multiline expression.  The REPL provides a special variable _ (underscore) which is used to pull the result of the last expression. SESSION:01
  • 14. REPL commands and Features > 1+2 3 > 1+2-3 0 > 1+(3-2)*4/2 3 > SESSION:01
  • 15. REPL commands and Features > var x = 10; undefined > var y = 20; undefined > x+y 30 > console.log(x+y); 30 undefined > SESSION:01
  • 16. Node.js Underscore _ variable  To get last result use underscore _ variable > console.clear() > a = 10 > b = 15 > a+b 25 > console.log(“last sum is: “ + _+5); last sum is 30 > SESSION:01
  • 17. Node.js Loop structure ‘do-while’  Loop Structure in Node.js > var a = 10 undefined > i = 1 1 > do{ ... console.log(i) ... i++; ... }while(i<a); SESSION:01 > 1 2 3 4 5 6 7 8 9 > Output:
  • 18. Node.js Primitive Data Types  Node.js includes following primitive types: • String • Number • Boolean • Undefined • Null • RegExp  Everything else is an object in Node.js. SESSION:01
  • 19. Node.js Data Types  Loose Typing • JavaScript in Node.js supports loose typing like the browser's JavaScript. • Use var keyword to declare a variable of any type. • Object Literal var obj = { authorName: 'Raxit Dilhan', language: 'Node.js' } SESSION:01
  • 20. Function in NodeJs File name: func1.js function display(){ console.log("Function 1"); } function dispPara(x){ console.log("Function with Para : ", x); } display(); dispPara(10); SESSION:01
  • 21. Buffer in NodeJs  Node.js includes an additional data type called Buffer (not available in browser's JavaScript).  Buffer is mainly used to store binary data, while reading from a file or receiving packets over the network. SESSION:01
  • 22. process object in NodeJs Each Node.js script runs in a process. It includes process object to get all the information about the current process of Node.js application. SESSION:01
  • 23. Defaults to local in NodeJs Nodejs JavaScript is different from browser's JavaScript when it comes to global scope. In the browser's JavaScript, variables declared without var keyword become global. In Node.js, everything becomes local by default. SESSION:01
  • 24. Access Global Scope in NodeJs In a browser, global scope is the window object. In Node.js, global object represents the global scope. To add something in global scope, you need to export it using export or module.export. The same way, import modules/object using require() function to access it from the global scope. For example, to export an object in Node.js, use exports.name = object. SESSION:01
  • 25. Access Global Scope in NodeJs exports.mylib = {  sum: function(a,b) {  console.log(“Sum = “, a+b);  },  greet: function(msg) {  console.log(“Hello…”, msg);  } } SESSION:01