SlideShare a Scribd company logo
Nodejs
Node is 
● Open source. 
● Cross-platform. 
● Event-driven. 
● Non-blocking I/O.
Built on V8 
● JavaScript engine for 
Chrome. 
● written in C++. 
● V8 can run standalone, or 
can be embedded into any 
C++ application.
History 
● Created for Linux use in 
2009. 
● By Ryan Dahl 
● Sponsored by Joyent.
Non Blocking IO - Event Loop
Hello World 
setTimeout(function(){ 
console.log('world'); 
},2000); 
console.log('Hello'); 
process.stdin.on('data', function 
(chunk) { 
process.stdout.write('data: ' + 
chunk); 
}); 
● Non-blocking IO needs 
different mindset and 
coding style. 
● You are organizing your 
code around events. 
● Nobody can tell the exact 
sequence of execution 
especially for IO events.
Callback could be a hell 
fs.readFile(my.json', function(err, data) { 
var info = JSON.parse(data); 
db.findOne({id: info.id}, function(err, record) { 
fs.writeFile('my.txt', record.title, function(){ 
console.log('Finish job'); 
}) 
}) 
});
Http Server 
var http = require('http'); 
Import module 
http.createServer(function (request, response) { 
Use module 
response.writeHead(200, {'Content-Type': 'text/plain'}); 
response.end('Hello Worldn'); 
}).listen(8124); 
console.log('Server running at http://127.0.0.1:8124/');
Create Module 
exports.test = function(){ 
console.log("Hi I'm inside 
the test module"); 
} 
● Use exports object to 
externalize function, 
object or class 
● User require function to 
import module into your 
code. 
var module = require('./test2.js'); 
module.test();
Package Manager - npm 
● NPM is the package manager for the 
Node JavaScript platform 
● It puts modules in place so that node 
can find them. 
● Reads all project dependencies from 
package.json 
● Main commands are init, install, link, ls, 
and search. 
{ 
"name": "NewProject", 
"version": "0.0.1", 
"description": "showcase project", 
"main": "index.js", 
"scripts": { 
"test": "node index.js" 
}, 
"keywords": [ 
"new", 
"project" 
], 
"author": "matef", 
"license": "BSD-2-Clause" 
}
Frameworks - ExpressJS 
● Express is a minimal and flexible 
Node.js web application 
framework. 
● Express enables developer to 
organize artifacts and routes and 
views in a simple way. 
● Express has a generator tool that 
build the typical structure for 
simple web project.
IBM® Bluemix™ 
● IBM® Bluemix™ is the IBM open cloud 
platform. 
● Bluemix™ supports Nodejs as one of its 
runtimes. 
● Bluemix™ provides boilerplates for faster 
development start.
Some 
insight into 
Nodejs ...
It is the next big 
thing … catch up :)

More Related Content

PDF
NodeJS overview
PDF
Fundamental of Node.JS - Internship Presentation - Week7
PDF
Node.js
PDF
Node.js
PPTX
An overview of node.js
PPTX
Untitled presentation(4)
PDF
Cloud api之應用與實例
PPTX
Future of NodeJS
NodeJS overview
Fundamental of Node.JS - Internship Presentation - Week7
Node.js
Node.js
An overview of node.js
Untitled presentation(4)
Cloud api之應用與實例
Future of NodeJS

What's hot (20)

PPTX
Node.js tutoria for beginner
PDF
Node js实践
PPTX
Nightwatch 101 - Salvador Molina
PDF
Nodejs presentation
PDF
Hacking NodeJS applications for fun and profit
PPTX
Nodejs intro
PDF
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
PDF
ODP
Debug JNI code with ndk-gdb and eclipse GUI
PDF
Use Node.js to create a REST API
PDF
Getting started with developing Nodejs
PDF
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
PDF
WebGL
PPTX
TDD With Typescript - Noam Katzir
PDF
Start your container journey safely
PDF
(C)NodeJS
PPTX
Introduction to Node.js
PDF
Node.js in 2021
KEY
node.js dao
PPTX
Introduction to Node js
Node.js tutoria for beginner
Node js实践
Nightwatch 101 - Salvador Molina
Nodejs presentation
Hacking NodeJS applications for fun and profit
Nodejs intro
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Debug JNI code with ndk-gdb and eclipse GUI
Use Node.js to create a REST API
Getting started with developing Nodejs
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
WebGL
TDD With Typescript - Noam Katzir
Start your container journey safely
(C)NodeJS
Introduction to Node.js
Node.js in 2021
node.js dao
Introduction to Node js
Ad

Viewers also liked (20)

PDF
New Approaches to Security and Availability for Cloud Data
 
PDF
EMC Isilon Best Practices for Hadoop Data Storage
 
PDF
The Best Infrastructure for OpenStack: VMware vSphere and Virtual SAN
 
PDF
RSA Online Fraud Report - July 2014
 
PPT
Friday atlas lesson
PDF
Why Passwords are not strong enough
 
PDF
The EMC Isilon Scale-Out Data Lake
 
PDF
V mware organizing-for-the-cloud-whitepaper
 
PDF
La televisió blai
PPTX
産後が起点となる社会問題とマドレボニータの紹介20150613
PDF
8.presentatie bedrijven.110708js
PPTX
PDF
Pivotal CF on Vblock Systems
 
PPT
Unemployment rates 2014
PPTX
Monopolistic comp
PDF
EMC Greenplum Database version 4.2
 
PPTX
Gdp and economic indicators
PPTX
Mon roman empire lang
PPTX
Block fascism and italy
PDF
Canals de tv via satel·lit asma
New Approaches to Security and Availability for Cloud Data
 
EMC Isilon Best Practices for Hadoop Data Storage
 
The Best Infrastructure for OpenStack: VMware vSphere and Virtual SAN
 
RSA Online Fraud Report - July 2014
 
Friday atlas lesson
Why Passwords are not strong enough
 
The EMC Isilon Scale-Out Data Lake
 
V mware organizing-for-the-cloud-whitepaper
 
La televisió blai
産後が起点となる社会問題とマドレボニータの紹介20150613
8.presentatie bedrijven.110708js
Pivotal CF on Vblock Systems
 
Unemployment rates 2014
Monopolistic comp
EMC Greenplum Database version 4.2
 
Gdp and economic indicators
Mon roman empire lang
Block fascism and italy
Canals de tv via satel·lit asma
Ad

Similar to Nodejs (20)

PPTX
Kalp Corporate Node JS Perfect Guide
PDF
NodeJS for Beginner
PPT
18_Node.js.ppt
PPTX
PPTX
NodeJS - Server Side JS
PPT
18_Node.js.ppt
PDF
Node.js for beginner
PPTX
Building Applications With the MEAN Stack
PPTX
PDF
PPTX
Node js meetup
PPTX
Introduction to Node.js
ODP
Introduce about Nodejs - duyetdev.com
PPT
Nodejs Intro Part One
KEY
Playing With Fire - An Introduction to Node.js
PPTX
Basic Concept of Node.js & NPM
KEY
Node.js - A practical introduction (v2)
PPTX
NodeJS guide for beginners
PPT
Introduction to node.js aka NodeJS
PPTX
Kalp Corporate Node JS Perfect Guide
NodeJS for Beginner
18_Node.js.ppt
NodeJS - Server Side JS
18_Node.js.ppt
Node.js for beginner
Building Applications With the MEAN Stack
Node js meetup
Introduction to Node.js
Introduce about Nodejs - duyetdev.com
Nodejs Intro Part One
Playing With Fire - An Introduction to Node.js
Basic Concept of Node.js & NPM
Node.js - A practical introduction (v2)
NodeJS guide for beginners
Introduction to node.js aka NodeJS

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
medical staffing services at VALiNTRY
PDF
Digital Strategies for Manufacturing Companies
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
L1 - Introduction to python Backend.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
history of c programming in notes for students .pptx
CHAPTER 2 - PM Management and IT Context
Wondershare Filmora 15 Crack With Activation Key [2025
medical staffing services at VALiNTRY
Digital Strategies for Manufacturing Companies
VVF-Customer-Presentation2025-Ver1.9.pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
How to Choose the Right IT Partner for Your Business in Malaysia
How to Migrate SBCGlobal Email to Yahoo Easily
2025 Textile ERP Trends: SAP, Odoo & Oracle
L1 - Introduction to python Backend.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
Odoo POS Development Services by CandidRoot Solutions
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
history of c programming in notes for students .pptx

Nodejs

  • 2. Node is ● Open source. ● Cross-platform. ● Event-driven. ● Non-blocking I/O.
  • 3. Built on V8 ● JavaScript engine for Chrome. ● written in C++. ● V8 can run standalone, or can be embedded into any C++ application.
  • 4. History ● Created for Linux use in 2009. ● By Ryan Dahl ● Sponsored by Joyent.
  • 5. Non Blocking IO - Event Loop
  • 6. Hello World setTimeout(function(){ console.log('world'); },2000); console.log('Hello'); process.stdin.on('data', function (chunk) { process.stdout.write('data: ' + chunk); }); ● Non-blocking IO needs different mindset and coding style. ● You are organizing your code around events. ● Nobody can tell the exact sequence of execution especially for IO events.
  • 7. Callback could be a hell fs.readFile(my.json', function(err, data) { var info = JSON.parse(data); db.findOne({id: info.id}, function(err, record) { fs.writeFile('my.txt', record.title, function(){ console.log('Finish job'); }) }) });
  • 8. Http Server var http = require('http'); Import module http.createServer(function (request, response) { Use module response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello Worldn'); }).listen(8124); console.log('Server running at http://127.0.0.1:8124/');
  • 9. Create Module exports.test = function(){ console.log("Hi I'm inside the test module"); } ● Use exports object to externalize function, object or class ● User require function to import module into your code. var module = require('./test2.js'); module.test();
  • 10. Package Manager - npm ● NPM is the package manager for the Node JavaScript platform ● It puts modules in place so that node can find them. ● Reads all project dependencies from package.json ● Main commands are init, install, link, ls, and search. { "name": "NewProject", "version": "0.0.1", "description": "showcase project", "main": "index.js", "scripts": { "test": "node index.js" }, "keywords": [ "new", "project" ], "author": "matef", "license": "BSD-2-Clause" }
  • 11. Frameworks - ExpressJS ● Express is a minimal and flexible Node.js web application framework. ● Express enables developer to organize artifacts and routes and views in a simple way. ● Express has a generator tool that build the typical structure for simple web project.
  • 12. IBM® Bluemix™ ● IBM® Bluemix™ is the IBM open cloud platform. ● Bluemix™ supports Nodejs as one of its runtimes. ● Bluemix™ provides boilerplates for faster development start.
  • 13. Some insight into Nodejs ...
  • 14. It is the next big thing … catch up :)