Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Node.js Introduction
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Brandon Keepers
PRO
March 26, 2012
Programming
1.7k
34
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Node.js Introduction
A brief introduction to Node.js given at the
Grand Rapids Web Development Group
.
Brandon Keepers
PRO
March 26, 2012
More Decks by Brandon Keepers
See All by Brandon Keepers
Automating Software Development
bkeepers
PRO
3
600
Building the GitHub workspace app
bkeepers
PRO
1
490
Contributing to Your Career
bkeepers
PRO
4
850
A Maturity Model for Embracing Open Source Software
bkeepers
PRO
3
1k
Open Source Principles for Internal Engineering Teams
bkeepers
PRO
8
1.5k
Carbon, Automobiles, Bebop & Fashion
bkeepers
PRO
1
680
Tending Your Open Source Garden, v2
bkeepers
PRO
1
730
Tending Your Open Source Garden
bkeepers
PRO
2
1.1k
The Loyal Renegade
bkeepers
PRO
3
1.1k
Other Decks in Programming
See All in Programming
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
400
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
310
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
「人を評価する AI」の設計と実装
ryoyanara
0
180
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
140
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
490
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
180
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
130
Foundation Models frameworkで画像分析
ryodeveloper
1
600
その節約、円になってますか?
isamumumu
1
710
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
490
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
460
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
380
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
400
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
480
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
470
WENDY [Excerpt]
tessaabrams
11
39k
Faster Mobile Websites
deanohume
310
32k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
340
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
270
Transcript
INTRODUCTION
Hi, I’m @bkeepers
None
nodejs.org Node.js is a platform built on Chrome's JavaScript runtime
for easily building fast, scalable network applications. Node.js uses an event-driven, non- blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
server side JavaScript
$ node webserver.js var http = require('http'), server = http.createServer();
server.on('request', function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }); server.listen(1337, "127.0.0.1"); console.log('Server running at http://127.0.0.1:1337/'); webserver.js
None
event loop modules package management
non-blocking evented I/O
event driven
event driven Button
event driven Button
event driven Button $('button').on('click', function(event) { alert('Event Driven!') });
event driven server.on('request', function(req, res) { res.write(handleRequest(req)) });
non-blocking
None
// blocking var files = fs.readdirSync('/tmp') for(var i = 0;
i < files.length; i++) { var file = files[i]; fs.unlinkSync('/tmp/' + file); console.log('successfully deleted ' + file); }
// blocking var files = fs.readdirSync('/tmp') for(var i = 0;
i < files.length; i++) { var file = files[i]; fs.unlinkSync('/tmp/' + file); console.log('successfully deleted ' + file); } // non-blocking fs.readdir('/tmp', function(err, files) { for(var i = 0; i < files.length; i++) { var file = files[i]; fs.unlink('/tmp/' + file, function (err) { if (err) throw err; console.log('successfully deleted ' + file); }); } });
CommonJS modules
JavaScript Pollutes
JavaScript Pollutes string = "pollution";
None
var http = require('http');
hello.js module.exports = function() { return 'Hello World' };
$ node myapp.js myapp.js var hello = require('./hello.js'); console.log(hello());
package management
npmjs.org
$ npm install <package>
package.json
package.json $ npm install { "name": "myapp", "version": "0.0.1", "dependencies":
{ "socket.io": "0.8.7", "coffee-script": "1.2.0", "spine": "~1.0.5" } }
building the simplest chat app in the world demo
references
http://nodejs.org/api/
None
thanks! @bkeepers