Enviar búsqueda
Cargar
node.js workshop- node.js basics
•
Descargar como PPTX, PDF
•
33 recomendaciones
•
17,949 vistas
Qiong Wu
Seguir
Software
Tecnología
Empresariales
Denunciar
Compartir
Denunciar
Compartir
1 de 24
Descargar ahora
Recomendados
node.js workshop- node.js middleware
node.js workshop- node.js middleware
Qiong Wu
Socket.io
Socket.io
Antonio Terreno
Socket.IO
Socket.IO
Arnout Kazemier
Going real time with Socket.io
Going real time with Socket.io
Arnout Kazemier
Socket.io (part 1)
Socket.io (part 1)
Andrea Tarquini
Actor Based Asyncronous IO in Akka
Actor Based Asyncronous IO in Akka
drewhk
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part A
Kazuchika Sekiya
Devinsampa nginx-scripting
Devinsampa nginx-scripting
Tony Fabeen
Recomendados
node.js workshop- node.js middleware
node.js workshop- node.js middleware
Qiong Wu
Socket.io
Socket.io
Antonio Terreno
Socket.IO
Socket.IO
Arnout Kazemier
Going real time with Socket.io
Going real time with Socket.io
Arnout Kazemier
Socket.io (part 1)
Socket.io (part 1)
Andrea Tarquini
Actor Based Asyncronous IO in Akka
Actor Based Asyncronous IO in Akka
drewhk
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part A
Kazuchika Sekiya
Devinsampa nginx-scripting
Devinsampa nginx-scripting
Tony Fabeen
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
Steve Rhoades
Intro to Systems Orchestration with MCollective
Intro to Systems Orchestration with MCollective
Puppet
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"
EPAM Systems
Socket.io under the hood
Socket.io under the hood
Haokang Den
Puppet Camp 2012
Puppet Camp 2012
Server Density
Mule ESB : ssh connector
Mule ESB : ssh connector
AnilKumar Etagowni
Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017
Zied GUESMI
Tic tac toe
Tic tac toe
jo pakson
WebSockets, Unity3D, and Clojure
WebSockets, Unity3D, and Clojure
Josh Glover
clonehd01
clonehd01
Luiz Francisco Bozo
React PHP: the NodeJS challenger
React PHP: the NodeJS challenger
vanphp
RPC to REST (Hypermedia)
RPC to REST (Hypermedia)
Andrei Neculau
Clojure@Nuday
Clojure@Nuday
Josh Glover
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Develcz
aiohttp intro
aiohttp intro
Anton Kasyanov
Travis CI+Dockerで複数バージョンの単体テスト
Travis CI+Dockerで複数バージョンの単体テスト
Sho Hashimoto
Top 28 programming language with hello world for artificial intelligence
Top 28 programming language with hello world for artificial intelligence
AL- AMIN
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Maki Toshio
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Arian Gutierrez
node.js workshop- node.js databases
node.js workshop- node.js databases
Qiong Wu
Intro to node.js
Intro to node.js
Thanos Polychronakis
Más contenido relacionado
La actualidad más candente
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
Steve Rhoades
Intro to Systems Orchestration with MCollective
Intro to Systems Orchestration with MCollective
Puppet
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"
EPAM Systems
Socket.io under the hood
Socket.io under the hood
Haokang Den
Puppet Camp 2012
Puppet Camp 2012
Server Density
Mule ESB : ssh connector
Mule ESB : ssh connector
AnilKumar Etagowni
Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017
Zied GUESMI
Tic tac toe
Tic tac toe
jo pakson
WebSockets, Unity3D, and Clojure
WebSockets, Unity3D, and Clojure
Josh Glover
clonehd01
clonehd01
Luiz Francisco Bozo
React PHP: the NodeJS challenger
React PHP: the NodeJS challenger
vanphp
RPC to REST (Hypermedia)
RPC to REST (Hypermedia)
Andrei Neculau
Clojure@Nuday
Clojure@Nuday
Josh Glover
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Develcz
aiohttp intro
aiohttp intro
Anton Kasyanov
Travis CI+Dockerで複数バージョンの単体テスト
Travis CI+Dockerで複数バージョンの単体テスト
Sho Hashimoto
Top 28 programming language with hello world for artificial intelligence
Top 28 programming language with hello world for artificial intelligence
AL- AMIN
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Maki Toshio
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Arian Gutierrez
La actualidad más candente
(20)
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
Intro to Systems Orchestration with MCollective
Intro to Systems Orchestration with MCollective
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"
Socket.io under the hood
Socket.io under the hood
Puppet Camp 2012
Puppet Camp 2012
Mule ESB : ssh connector
Mule ESB : ssh connector
Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017
Tic tac toe
Tic tac toe
WebSockets, Unity3D, and Clojure
WebSockets, Unity3D, and Clojure
clonehd01
clonehd01
React PHP: the NodeJS challenger
React PHP: the NodeJS challenger
RPC to REST (Hypermedia)
RPC to REST (Hypermedia)
Clojure@Nuday
Clojure@Nuday
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
aiohttp intro
aiohttp intro
Travis CI+Dockerで複数バージョンの単体テスト
Travis CI+Dockerで複数バージョンの単体テスト
Top 28 programming language with hello world for artificial intelligence
Top 28 programming language with hello world for artificial intelligence
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Destacado
node.js workshop- node.js databases
node.js workshop- node.js databases
Qiong Wu
Intro to node.js
Intro to node.js
Thanos Polychronakis
Audience Reach Measurement Guidelines 1.0
Audience Reach Measurement Guidelines 1.0
Leonardo Naressi
Ostern in finnland ella
Ostern in finnland ella
Eine kleine Deutschkiste
ARTIKEL SAIL KOMODO
ARTIKEL SAIL KOMODO
sipri jemalur
Perdre Sa Cellulite
Perdre Sa Cellulite
Cardenas Realpe Gustavo
휴대폰결제『BU797』.『COM』미니초코볼자판기 봉평
휴대폰결제『BU797』.『COM』미니초코볼자판기 봉평
gsidjfs
Wild Times
Wild Times
Asgar Pathan
อุปกรณ์เครือข่ายคอมพิวเตอร์
อุปกรณ์เครือข่ายคอมพิวเตอร์
I'Tay Tanawin
PET scans
PET scans
TheLastAngels
อุปกรณ์สำรองข้อมูล
อุปกรณ์สำรองข้อมูล
Yoshikuni Yuusuke
강원도팬션 미국관광비자체류기간
강원도팬션 미국관광비자체류기간
hjsoidjgo
China venture capital industry indepth research and investment strategic plan...
China venture capital industry indepth research and investment strategic plan...
Qianzhan Intelligence
0 PREMIO “RELEVANTE” EN 13MA JORNADA CIENTÍFICA ESTUDIANTIL
0 PREMIO “RELEVANTE” EN 13MA JORNADA CIENTÍFICA ESTUDIANTIL
Randy Mujica
하트
하트
gsidjfs
수원호텔캐슬 홍콩항공권
수원호텔캐슬 홍콩항공권
hjsoidjgo
태안 일본비자
태안 일본비자
gsidjfs
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
Electronics Zener Diode Light Emitting Diode
Electronics Zener Diode Light Emitting Diode
ayman diab
China auto parts and components manufacturing industry in depth market resear...
China auto parts and components manufacturing industry in depth market resear...
Qianzhan Intelligence
Destacado
(20)
node.js workshop- node.js databases
node.js workshop- node.js databases
Intro to node.js
Intro to node.js
Audience Reach Measurement Guidelines 1.0
Audience Reach Measurement Guidelines 1.0
Ostern in finnland ella
Ostern in finnland ella
ARTIKEL SAIL KOMODO
ARTIKEL SAIL KOMODO
Perdre Sa Cellulite
Perdre Sa Cellulite
휴대폰결제『BU797』.『COM』미니초코볼자판기 봉평
휴대폰결제『BU797』.『COM』미니초코볼자판기 봉평
Wild Times
Wild Times
อุปกรณ์เครือข่ายคอมพิวเตอร์
อุปกรณ์เครือข่ายคอมพิวเตอร์
PET scans
PET scans
อุปกรณ์สำรองข้อมูล
อุปกรณ์สำรองข้อมูล
강원도팬션 미국관광비자체류기간
강원도팬션 미국관광비자체류기간
China venture capital industry indepth research and investment strategic plan...
China venture capital industry indepth research and investment strategic plan...
0 PREMIO “RELEVANTE” EN 13MA JORNADA CIENTÍFICA ESTUDIANTIL
0 PREMIO “RELEVANTE” EN 13MA JORNADA CIENTÍFICA ESTUDIANTIL
하트
하트
수원호텔캐슬 홍콩항공권
수원호텔캐슬 홍콩항공권
태안 일본비자
태안 일본비자
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
Electronics Zener Diode Light Emitting Diode
Electronics Zener Diode Light Emitting Diode
China auto parts and components manufacturing industry in depth market resear...
China auto parts and components manufacturing industry in depth market resear...
Similar a node.js workshop- node.js basics
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
Tom Croucher
Introduction to Node.js
Introduction to Node.js
Somkiat Puisungnoen
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
Tom Croucher
Node.js - A Quick Tour
Node.js - A Quick Tour
Felix Geisendörfer
Introduction to Nodejs
Introduction to Nodejs
Gabriele Lana
node.js dao
node.js dao
Vladimir Miguro
5.node js
5.node js
Geunhyung Kim
Writing robust Node.js applications
Writing robust Node.js applications
Tom Croucher
Quick Start to Node.js
Quick Start to Node.js
Soni Pandey
Node.js first slide
Node.js first slide
Soni Pandey
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JS
Cosmin Mereuta
Intro to Node
Intro to Node
Aaron Stannard
Node.js
Node.js
Pravin Mishra
Introduction to Vert.x
Introduction to Vert.x
Yiguang Hu
Server Side Swift: Vapor
Server Side Swift: Vapor
Paweł Kowalczuk
Node.js Express
Node.js Express
Eyal Vardi
Intsllation & 1st program nodejs
Intsllation & 1st program nodejs
monikadeshmane
Nodejs Explained with Examples
Nodejs Explained with Examples
Gabriele Lana
Nodejsexplained 101116115055-phpapp02
Nodejsexplained 101116115055-phpapp02
Sunny Gupta
JavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to Electron
Brainhub
Similar a node.js workshop- node.js basics
(20)
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
Introduction to Node.js
Introduction to Node.js
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
Node.js - A Quick Tour
Node.js - A Quick Tour
Introduction to Nodejs
Introduction to Nodejs
node.js dao
node.js dao
5.node js
5.node js
Writing robust Node.js applications
Writing robust Node.js applications
Quick Start to Node.js
Quick Start to Node.js
Node.js first slide
Node.js first slide
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JS
Intro to Node
Intro to Node
Node.js
Node.js
Introduction to Vert.x
Introduction to Vert.x
Server Side Swift: Vapor
Server Side Swift: Vapor
Node.js Express
Node.js Express
Intsllation & 1st program nodejs
Intsllation & 1st program nodejs
Nodejs Explained with Examples
Nodejs Explained with Examples
Nodejsexplained 101116115055-phpapp02
Nodejsexplained 101116115055-phpapp02
JavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to Electron
Más de Qiong Wu
node.js workshop- node.js unit testing
node.js workshop- node.js unit testing
Qiong Wu
node.js workshop- JavaScript Async
node.js workshop- JavaScript Async
Qiong Wu
node.js workshop- JavaScript Basics
node.js workshop- JavaScript Basics
Qiong Wu
Parallele Softwareentwicklung mit .NET 4.0
Parallele Softwareentwicklung mit .NET 4.0
Qiong Wu
S N A I L Final Presentation
S N A I L Final Presentation
Qiong Wu
3 Interop Part2
3 Interop Part2
Qiong Wu
Kickoff
Kickoff
Qiong Wu
2 Interop
2 Interop
Qiong Wu
C# Workshop - File Operations
C# Workshop - File Operations
Qiong Wu
C# Workshop - Networking
C# Workshop - Networking
Qiong Wu
C# Workshop - Threading
C# Workshop - Threading
Qiong Wu
Life In Power Point
Life In Power Point
Qiong Wu
Más de Qiong Wu
(12)
node.js workshop- node.js unit testing
node.js workshop- node.js unit testing
node.js workshop- JavaScript Async
node.js workshop- JavaScript Async
node.js workshop- JavaScript Basics
node.js workshop- JavaScript Basics
Parallele Softwareentwicklung mit .NET 4.0
Parallele Softwareentwicklung mit .NET 4.0
S N A I L Final Presentation
S N A I L Final Presentation
3 Interop Part2
3 Interop Part2
Kickoff
Kickoff
2 Interop
2 Interop
C# Workshop - File Operations
C# Workshop - File Operations
C# Workshop - Networking
C# Workshop - Networking
C# Workshop - Threading
C# Workshop - Threading
Life In Power Point
Life In Power Point
Último
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
panagenda
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
Philip Schwarz
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
AmarnathKambale
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Steffen Staab
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
masabamasaba
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
masabamasaba
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
masabamasaba
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
masabamasaba
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Bert Jan Schrijver
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
masabamasaba
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
SelfMade bd
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
masabamasaba
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
Último
(20)
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
node.js workshop- node.js basics
1.
2.
2
3.
3
4.
4
5.
5
6.
6
7.
7
8.
8 node > console.log('Hello World'); Hello
World
9.
9 console.log('Hello World'); >node app.js Hello
World
10.
10 var http =
require('http'); http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello Worldn'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');
11.
11 var http =
require('http'); http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello Worldn'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');
12.
12
13.
13 exports.helloworld = function
() { console.log('Hello World'); } var test = require('./test.js'); test.helloworld();
14.
14 module.exports = function
() { this.name = "test object"; this.color = "red"; this.size = "large"; } var test = require('./test.js'); var testObject = new test(); console.log('name:' + testObject.name); console.log('color:' + testObject.color); console.log('size:' + testObject.size);
15.
15
16.
16
17.
17 { "name": "TestNodejsApp", "version": "0.0.0", "description":
"TestNodejsApp", "private": true, "main": "app.js", "author": { "name": "Qiong Wu", "email": "" }, "dependencies": { "express": "3.4.4", "jade": "*", "stylus": "*" } }
18.
18
19.
19
20.
20 server.on('connection', function (stream) { console.log('someone
connected!'); }); server.once('connection', function (stream) { console.log('Ah, we have our first user!'); });
21.
21 function Test(colour) { this.colour
= colour; events.EventEmitter.call(this); this.sendEvent = function() { this.emit('EventSent'); } } Test.prototype.__proto__ = events.EventEmitter.prototype; var testObject = new Test('white'); testObject.on('EventSent', function() { console.log('Event received'); }); testObject.sendEvent();
22.
22
23.
23 // write 'hello,
' and then end with 'world!' http.createServer(function (req, res) { res.write('hello, '); res.end('world!'); // writing more now is not allowed! });
24.
24
Descargar ahora