SlideShare a Scribd company logo
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
“Everything that can be written in JavaScript
will eventually be written in JavaScript”.
(Atwood’s law)
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
Google JavaScript engine
A high performance, cross-platform evented I/O library
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
(source: Future-proofing Your Apps: Cloud Foundry and Node.js)
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com(source: Future-proofing Your Apps: Cloud Foundry and Node.js)
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com(source: Future-proofing Your Apps: Cloud Foundry and Node.js)
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
Objects:
 global
 process
 Console
 module
 exports
functions:
 Buffer
 require()
 setTimeout(cb,ms) , clearTimeout(t)
 setInterval(cb,ms) , clearInterval(t)
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
var circle = require('./circle.js');
console.log('The area of radius 4: '+ circle.area(4));
foo.js
var PI = Math.PI;
exports.area = function (r) {return PI * r * r;};
exports.circumference = function (r) {return 2 * PI * r;};
circle.js
The variable PI is
private to circle.js
exports === module.exports
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
console.log('a starting');
exports.done = false;
var b = require('./b.js');
console.log('in a,b.done= %j', b.done);
exports.done = true;
console.log('a done');
console.log('b starting');
exports.done = false;
var a = require('./a.js');
console.log('in b,a.done= %j', a.done);
exports.done = true;
console.log('b done');
console.log('main starting');
var a = require('./a.js');
var b = require('./b.js');
console.log('in main, a.done=%j, b.done=%j', a.done, b.done);
b.jsa.js
main.js
b.js tries to load a.js. In order to prevent
an infinite loop an unfinished copy of
the a.js exports object is returned to
the b.js module.
main starting
a starting
b starting
in b, a.done = false
b done
in a, b.done = true
a done
in main, a.done=true, b.done=true
Output
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
 https
 Net
 Os
 Path
 Punycode
 Querystring
 Readline
 Repl
 string_decoder
 Tls
 Tty
 url
 Util
 Vm
 zlib
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com
© 2014 All rights reserved. Tel: 054-5-767-300, Email: evardi@gmail.com

More Related Content

What's hot (20)

PPTX
Node js Introduction
sanskriti agarwal
 
PPTX
Express JS
Alok Guha
 
PDF
Introduction to Node.js
Rob O'Doherty
 
PPTX
Spring Boot and REST API
07.pallav
 
PPTX
Introduction Node.js
Erik van Appeldoorn
 
PDF
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
PDF
Understanding react hooks
Samundra khatri
 
PDF
REST APIs with Spring
Joshua Long
 
PPTX
Node js introduction
Joseph de Castelnau
 
PPTX
Angular
sridhiya
 
PDF
Angular and The Case for RxJS
Sandi Barr
 
PDF
Express node js
Yashprit Singh
 
PPTX
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
PDF
Introduction to RxJS
Brainhub
 
PDF
Asynchronous JavaScript Programming with Callbacks & Promises
Hùng Nguyễn Huy
 
PPTX
Introduction to php
Taha Malampatti
 
PPTX
React state
Ducat
 
PPTX
ReactJS presentation.pptx
DivyanshGupta922023
 
PPT
Php Lecture Notes
Santhiya Grace
 
Node js Introduction
sanskriti agarwal
 
Express JS
Alok Guha
 
Introduction to Node.js
Rob O'Doherty
 
Spring Boot and REST API
07.pallav
 
Introduction Node.js
Erik van Appeldoorn
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
Understanding react hooks
Samundra khatri
 
REST APIs with Spring
Joshua Long
 
Node js introduction
Joseph de Castelnau
 
Angular
sridhiya
 
Angular and The Case for RxJS
Sandi Barr
 
Express node js
Yashprit Singh
 
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
Introduction to RxJS
Brainhub
 
Asynchronous JavaScript Programming with Callbacks & Promises
Hùng Nguyễn Huy
 
Introduction to php
Taha Malampatti
 
React state
Ducat
 
ReactJS presentation.pptx
DivyanshGupta922023
 
Php Lecture Notes
Santhiya Grace
 

Viewers also liked (20)

PPTX
Node.js File system & Streams
Eyal Vardi
 
PPTX
Node.js Socket.IO
Eyal Vardi
 
PPTX
Node.js Event Emitter
Eyal Vardi
 
PPTX
Angular 2.0 forms
Eyal Vardi
 
PPTX
Modules and injector
Eyal Vardi
 
PPTX
Async & Parallel in JavaScript
Eyal Vardi
 
PPTX
Angular 2.0 Views
Eyal Vardi
 
PPTX
Angular 2.0 Pipes
Eyal Vardi
 
PPTX
Http Communication in Angular 2.0
Eyal Vardi
 
PPTX
Angular 2.0 Routing and Navigation
Eyal Vardi
 
PPTX
Node.js Spplication Scaling
Eyal Vardi
 
PPTX
Routing And Navigation
Eyal Vardi
 
PPTX
Angular 2 NgModule
Eyal Vardi
 
PPTX
Template syntax in Angular 2.0
Eyal Vardi
 
PPTX
Upgrading from Angular 1.x to Angular 2.x
Eyal Vardi
 
PPTX
Component lifecycle hooks in Angular 2.0
Eyal Vardi
 
PPTX
Angular 2.0 Dependency injection
Eyal Vardi
 
PPTX
Angular 2 - Ahead of-time Compilation
Eyal Vardi
 
PPTX
Performance Optimization In Angular 2
Eyal Vardi
 
PPTX
Angular 1.x vs. Angular 2.x
Eyal Vardi
 
Node.js File system & Streams
Eyal Vardi
 
Node.js Socket.IO
Eyal Vardi
 
Node.js Event Emitter
Eyal Vardi
 
Angular 2.0 forms
Eyal Vardi
 
Modules and injector
Eyal Vardi
 
Async & Parallel in JavaScript
Eyal Vardi
 
Angular 2.0 Views
Eyal Vardi
 
Angular 2.0 Pipes
Eyal Vardi
 
Http Communication in Angular 2.0
Eyal Vardi
 
Angular 2.0 Routing and Navigation
Eyal Vardi
 
Node.js Spplication Scaling
Eyal Vardi
 
Routing And Navigation
Eyal Vardi
 
Angular 2 NgModule
Eyal Vardi
 
Template syntax in Angular 2.0
Eyal Vardi
 
Upgrading from Angular 1.x to Angular 2.x
Eyal Vardi
 
Component lifecycle hooks in Angular 2.0
Eyal Vardi
 
Angular 2.0 Dependency injection
Eyal Vardi
 
Angular 2 - Ahead of-time Compilation
Eyal Vardi
 
Performance Optimization In Angular 2
Eyal Vardi
 
Angular 1.x vs. Angular 2.x
Eyal Vardi
 
Ad

Similar to Node js overview (20)

PPTX
Javascript Best Practices and Intro to Titanium
Techday7
 
PDF
Whats new in ES2019
chayanikaa
 
PDF
Practical JavaScript Programming - Session 8/8
Wilson Su
 
PPTX
Intro To Node.js
Chris Cowan
 
KEY
Node.js basics
Ben Lin
 
PDF
JavaScript for impatient programmers.pdf
JoaqunFerrariIlusus
 
PDF
Advanced Java Script.pdf
Sophia Diaz
 
PDF
Learning Nodejs For Net Developers Harry Cummings
coeldiad
 
PPTX
Web technologies-course 12.pptx
Stefan Oprea
 
PDF
High quality Front-End
David Simons
 
PPTX
Overview of Node JS
Jacob Nelson
 
PPTX
JS & NodeJS - An Introduction
Nirvanic Labs
 
PDF
React Native Evening
Troy Miles
 
PPTX
React Basic and Advance || React Basic
rafaqathussainc077
 
PDF
Javascript The Definitive Guideactivate Your Web Pages 6th Ed Flanagan
reknesluima
 
PDF
www.webre24h.com - [Wordware] advanced javascript, 3rd ed. - [easttom]
webre24h
 
PDF
Intro to React
Troy Miles
 
PDF
Scalable JavaScript
Ynon Perek
 
PDF
NodeJS for Beginner
Apaichon Punopas
 
PDF
Global objects in Node.pdf
SudhanshiBakre1
 
Javascript Best Practices and Intro to Titanium
Techday7
 
Whats new in ES2019
chayanikaa
 
Practical JavaScript Programming - Session 8/8
Wilson Su
 
Intro To Node.js
Chris Cowan
 
Node.js basics
Ben Lin
 
JavaScript for impatient programmers.pdf
JoaqunFerrariIlusus
 
Advanced Java Script.pdf
Sophia Diaz
 
Learning Nodejs For Net Developers Harry Cummings
coeldiad
 
Web technologies-course 12.pptx
Stefan Oprea
 
High quality Front-End
David Simons
 
Overview of Node JS
Jacob Nelson
 
JS & NodeJS - An Introduction
Nirvanic Labs
 
React Native Evening
Troy Miles
 
React Basic and Advance || React Basic
rafaqathussainc077
 
Javascript The Definitive Guideactivate Your Web Pages 6th Ed Flanagan
reknesluima
 
www.webre24h.com - [Wordware] advanced javascript, 3rd ed. - [easttom]
webre24h
 
Intro to React
Troy Miles
 
Scalable JavaScript
Ynon Perek
 
NodeJS for Beginner
Apaichon Punopas
 
Global objects in Node.pdf
SudhanshiBakre1
 
Ad

More from Eyal Vardi (12)

PPTX
Why magic
Eyal Vardi
 
PPTX
Smart Contract
Eyal Vardi
 
PDF
Rachel's grandmother's recipes
Eyal Vardi
 
PPTX
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
 
PPTX
Angular 2 Architecture
Eyal Vardi
 
PPTX
Modules in ECMAScript 6.0
Eyal Vardi
 
PPTX
Proxies in ECMAScript 6.0
Eyal Vardi
 
PPTX
Iterators & Generators in ECMAScript 6.0
Eyal Vardi
 
PPTX
Symbols in ECMAScript 6.0
Eyal Vardi
 
PPTX
Objects & Classes in ECMAScript 6.0
Eyal Vardi
 
PPTX
Scope & Functions in ECMAScript 6.0
Eyal Vardi
 
PPTX
AngularJS Internal
Eyal Vardi
 
Why magic
Eyal Vardi
 
Smart Contract
Eyal Vardi
 
Rachel's grandmother's recipes
Eyal Vardi
 
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
 
Angular 2 Architecture
Eyal Vardi
 
Modules in ECMAScript 6.0
Eyal Vardi
 
Proxies in ECMAScript 6.0
Eyal Vardi
 
Iterators & Generators in ECMAScript 6.0
Eyal Vardi
 
Symbols in ECMAScript 6.0
Eyal Vardi
 
Objects & Classes in ECMAScript 6.0
Eyal Vardi
 
Scope & Functions in ECMAScript 6.0
Eyal Vardi
 
AngularJS Internal
Eyal Vardi
 

Node js overview