SlideShare a Scribd company logo
Academy PRO
Node.js
Platform
Lectures plan
1. Node.js Platform
2. Web applications - Default stack
3. Web applications - Alternative stacks
4. Node.js in Production
Origins
Ryan Dahl - 2009
Joyent
io.js
Nodejs foundation - TSC and various members on board
Why JS?
- Open and popular platform
- Event loop
- V8
Use cases
Web applications
Desktop applications
Console applications
IoT applications
Happy users
Why?
Vibrant community
Cheap performance
One web language
Super-easy to develop
Versions
nvm
https://github.com/creationix/nvm
nvm install node
nvm use node
npm install 6
npm install 4.2.1
Node.js anatomy
ES2015/16
http://node.green/
fs.readFile setTimeout
Event Loop
[sync
execution
scope]
microtasks
https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/
setImmediate()
process.nextTick(()=>{})
Promise
microtasks
Nodejs vs Traditional Server
Modules - CommonJS
Modules - CommonJS
fs
fs.chmod(path, mode, callback)
fs.chmodSync(path, mode)
fs.exists(path, callback)
fs.existsSync(path)
fs.mkdir(path[, mode], callback)
fs.mkdirSync(path[, mode])
fs.readdir(path[, options], callback)
fs.readdirSync(path[, options])
fs.readFile(file[, options], callback)
fs.readFileSync(file[, options])
fs.writeFile(file, data[, options], callback)
fs.writeFileSync(file, data[, options])
Fs modules
A `rm -rf` util for nodejs
https://github.com/isaacs/rimraf
fs with incremental backoff on EMFILE
https://github.com/isaacs/node-graceful-fs
http
Class: http.Agent
Class: http.ClientRequest
Class: http.Server
Class: http.ServerResponse
Class: http.IncomingMessage
http.createClient([port][, host])
http.createServer([requestListener])
http.get(options[, callback])
http.request(options[, callback])
Buffer
Buffer.alloc(size[, fill[, encoding]])
Buffer.allocUnsafe(size)
Buffer.allocUnsafeSlow(size)
Buffer.byteLength(string[, encoding])
Buffer.compare(buf1, buf2)
Buffer.concat(list[, totalLength])
Buffer.from(array)
Buffer.from(buffer)
Buffer.from(string[, encoding])
Buffer.isBuffer(obj)
Buffer.isEncoding(encoding)
Streams
Readable
Writable
Duplex
Transform
child_process
Async handling - Callbacks
Async
Async
Promises
Promises
Generators
Output ->
<- Input
Generators - Coroutines
Async await
Error handling
Error-first callback
Process events
npm init
npm install express
npm i express
npm install --save express
npm install --save-dev express
npm uninstall --save express
npm i -g pm2
npm
npm package.json
npm
V2 vs V3
V2 vs V3
Native modules
Academy PRO: Node.js platform. Lecture 1

More Related Content

PPTX
Arctic stack
PDF
GruntJS + Wordpress
PPTX
Herramientas front
PDF
ChakraCore is what?
PDF
Create a RESTful API with NodeJS, Express and MongoDB
PDF
Node js实践
PDF
(C)NodeJS
PDF
Deep dive-oz
Arctic stack
GruntJS + Wordpress
Herramientas front
ChakraCore is what?
Create a RESTful API with NodeJS, Express and MongoDB
Node js实践
(C)NodeJS
Deep dive-oz

What's hot (19)

PDF
Scaling Docker Registry
PDF
Docker. General overview
PDF
Libcontainer: joining forces under one roof
PDF
Juju + KubernetesでGPU の活用
PDF
Node.js concurrency
ODP
Node js presentation
PPTX
Halton Software Peer 2 Peer Meetup #10
PPTX
Create Rest API in Nodejs
KEY
MongoDB on CloudFoundry
PDF
Ondřej Procházka - Deployment podle Devel.cz
PDF
The Obsoletion of the OS
PDF
Juju 基礎編
KEY
Getting Started with MongoDB and Node.js
PDF
Building a REST API with Node.js and MongoDB
PDF
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
PDF
PDF
Compressed js with NodeJS & GruntJS
PPTX
Node js
PPTX
Scaling Docker Registry
Docker. General overview
Libcontainer: joining forces under one roof
Juju + KubernetesでGPU の活用
Node.js concurrency
Node js presentation
Halton Software Peer 2 Peer Meetup #10
Create Rest API in Nodejs
MongoDB on CloudFoundry
Ondřej Procházka - Deployment podle Devel.cz
The Obsoletion of the OS
Juju 基礎編
Getting Started with MongoDB and Node.js
Building a REST API with Node.js and MongoDB
[5분 따라하기] 비주얼 스튜디오 C++에서 JSON 파서 설치하기
Compressed js with NodeJS & GruntJS
Node js
Ad

Similar to Academy PRO: Node.js platform. Lecture 1 (20)

PPT
Introduction to node.js aka NodeJS
PPT
Introducción y comandos en NodeJS slodte
PPTX
Introduction to Node.js
PPTX
An overview of node.js
PPT
18_Node.js.ppt
PDF
Node.js quick intro
PDF
Node.js Web Development .pdf
PDF
Ask us anything v9
PDF
Node.js – ask us anything!
PPT
18_Node.js.ppt
PDF
Node.js.pdf
PPTX
Node.js Chapter1
PPTX
Nodejs
PDF
Introduction to Node.js
PPTX
PPTX
NodeJS - Server Side JS
PPTX
Node_JS_Presentation.pptxgggghhhhhhhhhhhhh
PPTX
02 Node introduction
PPTX
Node Session - 1
PDF
Intro to node.js
Introduction to node.js aka NodeJS
Introducción y comandos en NodeJS slodte
Introduction to Node.js
An overview of node.js
18_Node.js.ppt
Node.js quick intro
Node.js Web Development .pdf
Ask us anything v9
Node.js – ask us anything!
18_Node.js.ppt
Node.js.pdf
Node.js Chapter1
Nodejs
Introduction to Node.js
NodeJS - Server Side JS
Node_JS_Presentation.pptxgggghhhhhhhhhhhhh
02 Node introduction
Node Session - 1
Intro to node.js
Ad

More from Binary Studio (20)

PPTX
Academy PRO: D3, part 3
PPTX
Academy PRO: D3, part 1
PPTX
Academy PRO: Cryptography 3
PPTX
Academy PRO: Cryptography 1
PPTX
Academy PRO: Advanced React Ecosystem. MobX
PPTX
Academy PRO: Docker. Part 4
PPTX
Academy PRO: Docker. Part 2
PPTX
Academy PRO: Docker. Part 1
PPTX
Binary Studio Academy 2017: JS team project - Orderly
PPTX
Binary Studio Academy 2017: .NET team project - Unicorn
PPTX
Academy PRO: React native - miscellaneous
PPTX
Academy PRO: React native - publish
PPTX
Academy PRO: React native - navigation
PPTX
Academy PRO: React native - building first scenes
PPTX
Academy PRO: React Native - introduction
PPTX
Academy PRO: Push notifications. Denis Beketsky
PPTX
Academy PRO: Docker. Lecture 4
PPTX
Academy PRO: Docker. Lecture 3
PPTX
Academy PRO: Docker. Lecture 2
PPTX
Academy PRO: Docker. Lecture 1
Academy PRO: D3, part 3
Academy PRO: D3, part 1
Academy PRO: Cryptography 3
Academy PRO: Cryptography 1
Academy PRO: Advanced React Ecosystem. MobX
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 1
Binary Studio Academy 2017: JS team project - Orderly
Binary Studio Academy 2017: .NET team project - Unicorn
Academy PRO: React native - miscellaneous
Academy PRO: React native - publish
Academy PRO: React native - navigation
Academy PRO: React native - building first scenes
Academy PRO: React Native - introduction
Academy PRO: Push notifications. Denis Beketsky
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 1

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Machine Learning_overview_presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
1. Introduction to Computer Programming.pptx
PDF
Encapsulation theory and applications.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
NewMind AI Weekly Chronicles - August'25-Week II
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Programs and apps: productivity, graphics, security and other tools
Machine Learning_overview_presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Spectroscopy.pptx food analysis technology
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Tartificialntelligence_presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
1. Introduction to Computer Programming.pptx
Encapsulation theory and applications.pdf

Academy PRO: Node.js platform. Lecture 1