SlideShare a Scribd company logo
NODE.JS BASIC
大綱、基礎介紹
Caesar Chi
http://about.me/clonn
Saturday, April 19, 14
Caesar Chi
clonncd
Saturday, April 19, 14
BASIC
•Java
•JavaScript
•Node.js
Saturday, April 19, 14
•Java
•JavaScript
•Node.js
Saturday, April 19, 14
BASIC
•Node.js
Saturday, April 19, 14
•Node.js
Saturday, April 19, 14
事前技能表
Saturday, April 19, 14
Command line
Saturday, April 19, 14
GIT(Github)
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
Server
Saturday, April 19, 14
注意事項
Saturday, April 19, 14
No Alert
Saturday, April 19, 14
No Alert
Saturday, April 19, 14
Crash only
Saturday, April 19, 14
SO...
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
好處?
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
1
Saturday, April 19, 14
Saturday, April 19, 14
FEATURE
Saturday, April 19, 14
NON-BLOCKING
非阻塞模式Saturday, April 19, 14
HIGH CONCURRENCY
高連線數量
http://www.flickr.com/photos/goldentime/4089413847/sizes/z/in/photostream/
Saturday, April 19, 14
EVENT-DRIVEN
事件驅動模型Saturday, April 19, 14
非阻塞?事件驅動?
Saturday, April 19, 14
以 當主角說明
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
非阻塞作法
Saturday, April 19, 14
Saturday, April 19, 14
var monther = require('monther');
monther.on(' ', function ( ) {
return ;
});
Saturday, April 19, 14
var monther = require('monther');
monther.on(' ', function ( ) {
return ;
});
Saturday, April 19, 14
var monther = require('monther');
monther.on(' ', function ( ) {
return ;
});
Saturday, April 19, 14
var monther = require('monther');
monther.on('cofee', function (data) {
return data;
});
monther.on('egg', function (egg) {
return egg;
});
monther.on('cake', function (cake) {
return cake;
});
Saturday, April 19, 14
MODULE
Saturday, April 19, 14
Saturday, April 19, 14
<script src=‘xxx’>
<script src=‘jquery.js’></script>
Saturday, April 19, 14
REQUIRE
=
LOAD MODULE
Saturday, April 19, 14
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var http = require(‘http’);
var fs = require(‘fs’);
var path = require(‘./yoo’);
Saturday, April 19, 14
new.js
var a = 123;
old.js
var a = 456;
Saturday, April 19, 14
new.js
var a = 123;
old.js
var a = 456;
Saturday, April 19, 14
PRINT(A)?
Saturday, April 19, 14
Saturday, April 19, 14
module.js
module.exports = {};
Saturday, April 19, 14
COMMONJS
http://www.commonjs.org/
Saturday, April 19, 14
http://www.commonjs.org/
Saturday, April 19, 14
MODULE 管理
Saturday, April 19, 14
Saturday, April 19, 14
MODULE 管理
•Global module,
•例如, process
•internal module,
•例如, http, fs, path, child_process...
•external module,
Saturday, April 19, 14
•Global module,
•例如, process
•internal module,
•例如, http, fs, path, child_process...
•external module,
Saturday, April 19, 14
Saturday, April 19, 14
NPM
• npm install module_name
• npm install -g module_name
• npm update [module_name]
• npm list
• npm ...
Saturday, April 19, 14
• npm install module_name
• npm install -g module_name
• npm update [module_name]
• npm list
• npm ...
Saturday, April 19, 14
NPM
•外部模組, 存於...
•node_modules/.....
Saturday, April 19, 14
•外部模組, 存於...
•node_modules/.....
Saturday, April 19, 14
NPM
•dependency manage
•package.json
Saturday, April 19, 14
•dependency manage
•package.json
Saturday, April 19, 14
NPM
•dependency manage
•package.json
Saturday, April 19, 14
•dependency manage
•package.json
Saturday, April 19, 14
as a web developers,
knowing some web structure is good for you
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14

More Related Content

Viewers also liked

Ysq rolnick schema short
Ysq rolnick schema shortYsq rolnick schema short
Ysq rolnick schema shortArnon Rolnick
 
Caracteristicas y diferencias entre bing y google
Caracteristicas y diferencias entre bing y googleCaracteristicas y diferencias entre bing y google
Caracteristicas y diferencias entre bing y googleHector Umajinga
 
Understanding Application Process is Key to School Admissions
Understanding Application Process is Key to School AdmissionsUnderstanding Application Process is Key to School Admissions
Understanding Application Process is Key to School AdmissionsMilton Hershey School
 
SiriusDecisions Summit 2014 - Toby Murdock Frank Barry
SiriusDecisions Summit 2014 - Toby Murdock Frank BarrySiriusDecisions Summit 2014 - Toby Murdock Frank Barry
SiriusDecisions Summit 2014 - Toby Murdock Frank BarryKapost
 
Chimp presentation.pptx.1 (2)
Chimp presentation.pptx.1 (2)Chimp presentation.pptx.1 (2)
Chimp presentation.pptx.1 (2)Laura Ferguson
 
Vocab week #9
Vocab week #9Vocab week #9
Vocab week #9Mr Tanada
 
Top 15 Cars that Oozes With Grandeur
Top 15 Cars that Oozes With GrandeurTop 15 Cars that Oozes With Grandeur
Top 15 Cars that Oozes With GrandeurEason Chan
 
Know your father who cares for you
Know your father who cares for youKnow your father who cares for you
Know your father who cares for youcmfindia
 
การพัฒนาซอฟต์แวร์แบบ Reactive Systems
การพัฒนาซอฟต์แวร์แบบ Reactive Systemsการพัฒนาซอฟต์แวร์แบบ Reactive Systems
การพัฒนาซอฟต์แวร์แบบ Reactive SystemsIMC Institute
 
Strategic Content Framework
Strategic Content FrameworkStrategic Content Framework
Strategic Content FrameworkRob Bertholf
 
XECon2015 :: [3-4] 조정현 - Laravel with cloud
XECon2015 :: [3-4] 조정현 - Laravel with cloudXECon2015 :: [3-4] 조정현 - Laravel with cloud
XECon2015 :: [3-4] 조정현 - Laravel with cloudXpressEngine
 
8.1 konsep hibah(syariah) arifah
8.1 konsep hibah(syariah) arifah8.1 konsep hibah(syariah) arifah
8.1 konsep hibah(syariah) arifahshahirah44
 
8.2(2,3,4) syariah afina h ibbah
8.2(2,3,4) syariah afina h ibbah8.2(2,3,4) syariah afina h ibbah
8.2(2,3,4) syariah afina h ibbahshahirah44
 
La isla bajo el mar
La isla bajo el marLa isla bajo el mar
La isla bajo el marcecy-mendez
 
Building Startup Ecosystems (Baku, Nov 2014)
Building Startup Ecosystems (Baku, Nov 2014)Building Startup Ecosystems (Baku, Nov 2014)
Building Startup Ecosystems (Baku, Nov 2014)Dave McClure
 

Viewers also liked (20)

Ysq rolnick schema short
Ysq rolnick schema shortYsq rolnick schema short
Ysq rolnick schema short
 
Caracteristicas y diferencias entre bing y google
Caracteristicas y diferencias entre bing y googleCaracteristicas y diferencias entre bing y google
Caracteristicas y diferencias entre bing y google
 
Understanding Application Process is Key to School Admissions
Understanding Application Process is Key to School AdmissionsUnderstanding Application Process is Key to School Admissions
Understanding Application Process is Key to School Admissions
 
Genre of text
Genre of textGenre of text
Genre of text
 
SiriusDecisions Summit 2014 - Toby Murdock Frank Barry
SiriusDecisions Summit 2014 - Toby Murdock Frank BarrySiriusDecisions Summit 2014 - Toby Murdock Frank Barry
SiriusDecisions Summit 2014 - Toby Murdock Frank Barry
 
Chimp presentation.pptx.1 (2)
Chimp presentation.pptx.1 (2)Chimp presentation.pptx.1 (2)
Chimp presentation.pptx.1 (2)
 
Vocab week #9
Vocab week #9Vocab week #9
Vocab week #9
 
Top 15 Cars that Oozes With Grandeur
Top 15 Cars that Oozes With GrandeurTop 15 Cars that Oozes With Grandeur
Top 15 Cars that Oozes With Grandeur
 
Know your father who cares for you
Know your father who cares for youKnow your father who cares for you
Know your father who cares for you
 
การพัฒนาซอฟต์แวร์แบบ Reactive Systems
การพัฒนาซอฟต์แวร์แบบ Reactive Systemsการพัฒนาซอฟต์แวร์แบบ Reactive Systems
การพัฒนาซอฟต์แวร์แบบ Reactive Systems
 
Workshop iOS
Workshop iOSWorkshop iOS
Workshop iOS
 
Mission Possible VenTESOL
Mission Possible VenTESOLMission Possible VenTESOL
Mission Possible VenTESOL
 
Strategic Content Framework
Strategic Content FrameworkStrategic Content Framework
Strategic Content Framework
 
XECon2015 :: [3-4] 조정현 - Laravel with cloud
XECon2015 :: [3-4] 조정현 - Laravel with cloudXECon2015 :: [3-4] 조정현 - Laravel with cloud
XECon2015 :: [3-4] 조정현 - Laravel with cloud
 
8.1 konsep hibah(syariah) arifah
8.1 konsep hibah(syariah) arifah8.1 konsep hibah(syariah) arifah
8.1 konsep hibah(syariah) arifah
 
8.2(2,3,4) syariah afina h ibbah
8.2(2,3,4) syariah afina h ibbah8.2(2,3,4) syariah afina h ibbah
8.2(2,3,4) syariah afina h ibbah
 
Iliade
IliadeIliade
Iliade
 
東海支部西田
東海支部西田東海支部西田
東海支部西田
 
La isla bajo el mar
La isla bajo el marLa isla bajo el mar
La isla bajo el mar
 
Building Startup Ecosystems (Baku, Nov 2014)
Building Startup Ecosystems (Baku, Nov 2014)Building Startup Ecosystems (Baku, Nov 2014)
Building Startup Ecosystems (Baku, Nov 2014)
 

More from Caesar Chi

為何技術老人這樣想那樣做?
為何技術老人這樣想那樣做?為何技術老人這樣想那樣做?
為何技術老人這樣想那樣做?Caesar Chi
 
面試AI技術大進化,加速招聘軟體工程師的全套攻略!
面試AI技術大進化,加速招聘軟體工程師的全套攻略!面試AI技術大進化,加速招聘軟體工程師的全套攻略!
面試AI技術大進化,加速招聘軟體工程師的全套攻略!Caesar Chi
 
初探工程師升級手冊 2022
初探工程師升級手冊 2022初探工程師升級手冊 2022
初探工程師升級手冊 2022Caesar Chi
 
預約及客服 LINE 服務串接大挑戰
預約及客服 LINE 服務串接大挑戰預約及客服 LINE 服務串接大挑戰
預約及客服 LINE 服務串接大挑戰Caesar Chi
 
Remote monitoring widget setup and customization
Remote monitoring  widget setup and customizationRemote monitoring  widget setup and customization
Remote monitoring widget setup and customizationCaesar Chi
 
JS 從 Non-type 到 Type 的愛恨情仇
JS 從 Non-type 到 Type 的愛恨情仇JS 從 Non-type 到 Type 的愛恨情仇
JS 從 Non-type 到 Type 的愛恨情仇Caesar Chi
 
LINE@ 2.0 offline to online
LINE@ 2.0  offline to onlineLINE@ 2.0  offline to online
LINE@ 2.0 offline to onlineCaesar Chi
 
Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow
Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow
Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow Caesar Chi
 
PWA and Chatbot - with e-Commerce experience sharing
PWA and Chatbot - with e-Commerce experience sharingPWA and Chatbot - with e-Commerce experience sharing
PWA and Chatbot - with e-Commerce experience sharingCaesar Chi
 
Morden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsMorden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsCaesar Chi
 
codecept.js introduce - front end test E2E tool introduce
codecept.js introduce - front end test E2E tool introducecodecept.js introduce - front end test E2E tool introduce
codecept.js introduce - front end test E2E tool introduceCaesar Chi
 
遠端團隊專案建立與管理 remote team management 2016
遠端團隊專案建立與管理 remote team management 2016遠端團隊專案建立與管理 remote team management 2016
遠端團隊專案建立與管理 remote team management 2016Caesar Chi
 
Introduce Angular2 & render & firebase flow
Introduce Angular2 & render & firebase flowIntroduce Angular2 & render & firebase flow
Introduce Angular2 & render & firebase flowCaesar Chi
 
如何提昇技術力 - 參與技術社群之經驗分享
如何提昇技術力 - 參與技術社群之經驗分享如何提昇技術力 - 參與技術社群之經驗分享
如何提昇技術力 - 參與技術社群之經驗分享Caesar Chi
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegapCaesar Chi
 
From devOps to front end Ops, test first
From devOps to front end Ops, test firstFrom devOps to front end Ops, test first
From devOps to front end Ops, test firstCaesar Chi
 
Docker with Cloud Service GCPUG
Docker with Cloud Service  GCPUGDocker with Cloud Service  GCPUG
Docker with Cloud Service GCPUGCaesar Chi
 
從失敗中學習打造技術團隊
從失敗中學習打造技術團隊從失敗中學習打造技術團隊
從失敗中學習打造技術團隊Caesar Chi
 
Docker with Cloud Service
Docker with Cloud ServiceDocker with Cloud Service
Docker with Cloud ServiceCaesar Chi
 
技術單兵作戰及團隊開發流程差異
技術單兵作戰及團隊開發流程差異技術單兵作戰及團隊開發流程差異
技術單兵作戰及團隊開發流程差異Caesar Chi
 

More from Caesar Chi (20)

為何技術老人這樣想那樣做?
為何技術老人這樣想那樣做?為何技術老人這樣想那樣做?
為何技術老人這樣想那樣做?
 
面試AI技術大進化,加速招聘軟體工程師的全套攻略!
面試AI技術大進化,加速招聘軟體工程師的全套攻略!面試AI技術大進化,加速招聘軟體工程師的全套攻略!
面試AI技術大進化,加速招聘軟體工程師的全套攻略!
 
初探工程師升級手冊 2022
初探工程師升級手冊 2022初探工程師升級手冊 2022
初探工程師升級手冊 2022
 
預約及客服 LINE 服務串接大挑戰
預約及客服 LINE 服務串接大挑戰預約及客服 LINE 服務串接大挑戰
預約及客服 LINE 服務串接大挑戰
 
Remote monitoring widget setup and customization
Remote monitoring  widget setup and customizationRemote monitoring  widget setup and customization
Remote monitoring widget setup and customization
 
JS 從 Non-type 到 Type 的愛恨情仇
JS 從 Non-type 到 Type 的愛恨情仇JS 從 Non-type 到 Type 的愛恨情仇
JS 從 Non-type 到 Type 的愛恨情仇
 
LINE@ 2.0 offline to online
LINE@ 2.0  offline to onlineLINE@ 2.0  offline to online
LINE@ 2.0 offline to online
 
Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow
Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow
Chatbot 智能溝通策 流程規劃與實做 e-Commerce Chatbot - AI strategy and Chat bot user flow
 
PWA and Chatbot - with e-Commerce experience sharing
PWA and Chatbot - with e-Commerce experience sharingPWA and Chatbot - with e-Commerce experience sharing
PWA and Chatbot - with e-Commerce experience sharing
 
Morden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsMorden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web Apps
 
codecept.js introduce - front end test E2E tool introduce
codecept.js introduce - front end test E2E tool introducecodecept.js introduce - front end test E2E tool introduce
codecept.js introduce - front end test E2E tool introduce
 
遠端團隊專案建立與管理 remote team management 2016
遠端團隊專案建立與管理 remote team management 2016遠端團隊專案建立與管理 remote team management 2016
遠端團隊專案建立與管理 remote team management 2016
 
Introduce Angular2 & render & firebase flow
Introduce Angular2 & render & firebase flowIntroduce Angular2 & render & firebase flow
Introduce Angular2 & render & firebase flow
 
如何提昇技術力 - 參與技術社群之經驗分享
如何提昇技術力 - 參與技術社群之經驗分享如何提昇技術力 - 參與技術社群之經驗分享
如何提昇技術力 - 參與技術社群之經驗分享
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegap
 
From devOps to front end Ops, test first
From devOps to front end Ops, test firstFrom devOps to front end Ops, test first
From devOps to front end Ops, test first
 
Docker with Cloud Service GCPUG
Docker with Cloud Service  GCPUGDocker with Cloud Service  GCPUG
Docker with Cloud Service GCPUG
 
從失敗中學習打造技術團隊
從失敗中學習打造技術團隊從失敗中學習打造技術團隊
從失敗中學習打造技術團隊
 
Docker with Cloud Service
Docker with Cloud ServiceDocker with Cloud Service
Docker with Cloud Service
 
技術單兵作戰及團隊開發流程差異
技術單兵作戰及團隊開發流程差異技術單兵作戰及團隊開發流程差異
技術單兵作戰及團隊開發流程差異
 

Recently uploaded

F5 LTM TROUBLESHOOTING Guide latest.pptx
F5 LTM TROUBLESHOOTING Guide latest.pptxF5 LTM TROUBLESHOOTING Guide latest.pptx
F5 LTM TROUBLESHOOTING Guide latest.pptxArjunJain44
 
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理eemet
 
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理kywwoyk
 
Memory compiler tutorial – TSMC 40nm technology
Memory compiler tutorial – TSMC 40nm technologyMemory compiler tutorial – TSMC 40nm technology
Memory compiler tutorial – TSMC 40nm technologyAhmed Abdelazeem
 
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理kywwoyk
 
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...Amil baba
 

Recently uploaded (6)

F5 LTM TROUBLESHOOTING Guide latest.pptx
F5 LTM TROUBLESHOOTING Guide latest.pptxF5 LTM TROUBLESHOOTING Guide latest.pptx
F5 LTM TROUBLESHOOTING Guide latest.pptx
 
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
 
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
 
Memory compiler tutorial – TSMC 40nm technology
Memory compiler tutorial – TSMC 40nm technologyMemory compiler tutorial – TSMC 40nm technology
Memory compiler tutorial – TSMC 40nm technology
 
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
 
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
 

Node basic training