SlideShare a Scribd company logo
NODE JS
YAUHENI NIKANOVICH
package ecosystem, npm, is the
largest ecosystem of open source
libraries in the world.
is a JavaScript runtime built
on Chrome's V8 JavaScript
engine.
uses an event-driven, non-blocking I/O
model that makes it lightweight and
efficient.
allows the creation of Web
servers and networking tools
using JavaScript
is the JavaScript execution engine built for Google Chrome
and open-sourced by Google in 2008. Written in C++, V8
compiles JavaScript source code to native machine code
instead of interpreting it in real time.
is a package manager for the JavaScript programming language.
It is the default package manager for the JavaScript runtime
environment NodeJS
It consists of a command line client, also called npm, and an
online database of public 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
All APIs of NodeJS library are asynchronous, that is, non-
blocking.
It essentially means a NodeJS based server never waits for an
API to return data.
The server moves to the next API after calling it and a
notification mechanism of Events of NodeJS helps the server
to get a response from the previous API call.
NodeJS allows to create a scalable and fast web server in
simple way by using JavaScript.
Opportunity to write client-side and server-side parts of web
application on your favourite JavaScript sounds appealing!
We will need:
‣ Knowledge of the basics JavaScript language
‣ Installed NodeJS (https://nodejs.org)
‣ Any text redactor / IDE
‣ Terminal
LET'S MAKE A SIMPLE SERVER WITH NODEJS (1/5)
Preparation:
‣ Create project folder
‣ Add server.js to project folder
‣ Install node-router package via npm
LET'S MAKE A SIMPLE SERVER WITH NODEJS (2/5)
‣ Add some code
{
LET'S MAKE A SIMPLE SERVER WITH NODEJS (2/5)
‣ Run our server.js
LET'S MAKE A SIMPLE SERVER WITH NODEJS (3/5)
LET'S MAKE A SIMPLE SERVER WITH NODEJS (4/5)
‣ And check the result in browser
As we can see at network tab, when we call origin.

Browser automatically send GET request to ORIGIN.
According the code if someone sent a request for origin then
NodeJS send back a response with text "Hello!"
Looks fine and easy, isn't it?
YAUHENI NIKANOVICH
Thanks
EMAIL: zhenyanikon@gmail.com
2016

More Related Content

What's hot

Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash Course
Haim Michael
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Winston Hsieh
 
Node js
Node jsNode js
Node js
umesh patil
 
Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise Class
Glenn Block
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
Yoann Gotthilf
 
NodeJS
NodeJSNodeJS
NodeJS
Alok Guha
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorial
Katy Slemon
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vadym Lotar
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
Bhavin Shah
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
Starting with Node.js
Starting with Node.jsStarting with Node.js
Starting with Node.js
Jitendra Zaa
 
Node intro
Node introNode intro
Node intro
Vishal Sharma
 
Future-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointFuture-proof Development for Classic SharePoint
Future-proof Development for Classic SharePoint
Bob German
 
Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...
Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...
Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...
Manoj Mohanan
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introduction
Parth Joshi
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js Platform
Naresh Chintalcheru
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June Meetup
Valeri Karpov
 
Introduction to node
Introduction to nodeIntroduction to node
Introduction to node
girish82
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
MongoDB
 

What's hot (20)

Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash Course
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node js
Node jsNode js
Node js
 
Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise Class
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
NodeJS
NodeJSNodeJS
NodeJS
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorial
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
 
Nodejs
NodejsNodejs
Nodejs
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
 
Starting with Node.js
Starting with Node.jsStarting with Node.js
Starting with Node.js
 
Node intro
Node introNode intro
Node intro
 
Future-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointFuture-proof Development for Classic SharePoint
Future-proof Development for Classic SharePoint
 
Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...
Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...
Simple hack: use multiple mongodb databases in a nodejs express mongodb appli...
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introduction
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js Platform
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June Meetup
 
Introduction to node
Introduction to nodeIntroduction to node
Introduction to node
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
 

Similar to Node js first look - 2016

Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sails
Brian Shannon
 
Nodejs
NodejsNodejs
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
sanskriti agarwal
 
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
 
Nodejs
NodejsNodejs
Nodejs
NodejsNodejs
Nodejs
dssprakash
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
David Ashton
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
Sreenivas Kappala
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
Inexture Solutions
 
Node.js.pdf
Node.js.pdfNode.js.pdf
Node.js.pdf
gulfam ali
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
leffen
 
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
 
Node
NodeNode
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous  Blocking or synchronous.pdfNode Js Non-blocking or asynchronous  Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
DarshanaMallick
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
Ahmed Elbassel
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
Arvind Devaraj
 

Similar to Node js first look - 2016 (20)

Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sails
 
Nodejs
NodejsNodejs
Nodejs
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
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
 
Nodejs
NodejsNodejs
Nodejs
 
Nodejs
NodejsNodejs
Nodejs
 
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
 
Proposal
ProposalProposal
Proposal
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
 
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
 
Node.js.pdf
Node.js.pdfNode.js.pdf
Node.js.pdf
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
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?
 
Node
NodeNode
Node
 
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous  Blocking or synchronous.pdfNode Js Non-blocking or asynchronous  Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 

Recently uploaded

一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 

Recently uploaded (20)

一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 

Node js first look - 2016

  • 2. package ecosystem, npm, is the largest ecosystem of open source libraries in the world. is a JavaScript runtime built on Chrome's V8 JavaScript engine. uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. allows the creation of Web servers and networking tools using JavaScript
  • 3. is the JavaScript execution engine built for Google Chrome and open-sourced by Google in 2008. Written in C++, V8 compiles JavaScript source code to native machine code instead of interpreting it in real time.
  • 4. is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment NodeJS It consists of a command line client, also called npm, and an online database of public 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
  • 5. All APIs of NodeJS library are asynchronous, that is, non- blocking. It essentially means a NodeJS based server never waits for an API to return data. The server moves to the next API after calling it and a notification mechanism of Events of NodeJS helps the server to get a response from the previous API call.
  • 6. NodeJS allows to create a scalable and fast web server in simple way by using JavaScript. Opportunity to write client-side and server-side parts of web application on your favourite JavaScript sounds appealing!
  • 7. We will need: ‣ Knowledge of the basics JavaScript language ‣ Installed NodeJS (https://nodejs.org) ‣ Any text redactor / IDE ‣ Terminal LET'S MAKE A SIMPLE SERVER WITH NODEJS (1/5)
  • 8. Preparation: ‣ Create project folder ‣ Add server.js to project folder ‣ Install node-router package via npm LET'S MAKE A SIMPLE SERVER WITH NODEJS (2/5)
  • 9. ‣ Add some code { LET'S MAKE A SIMPLE SERVER WITH NODEJS (2/5)
  • 10. ‣ Run our server.js LET'S MAKE A SIMPLE SERVER WITH NODEJS (3/5)
  • 11. LET'S MAKE A SIMPLE SERVER WITH NODEJS (4/5) ‣ And check the result in browser
  • 12. As we can see at network tab, when we call origin.
 Browser automatically send GET request to ORIGIN. According the code if someone sent a request for origin then NodeJS send back a response with text "Hello!" Looks fine and easy, isn't it?