Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
gfnork node.js workshop Lesson #4 middleware fo...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
gfnork
June 20, 2014
Programming
530
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
gfnork node.js workshop Lesson #4 middleware for node
connect.js, express.js and other fun things
gfnork
June 20, 2014
More Decks by gfnork
See All by gfnork
Basic Mobile Application Design
freundschaft
0
540
gfnork node.js workshop Lesson #1 JavaScript Basics
freundschaft
0
990
gfnork node.js workshop Lesson #2 JavaScript Async
freundschaft
0
1k
gfnork node.js workshop Lesson #3 node.js basics
freundschaft
0
480
gfnork node.js workshop Lesson #5 node.js databases
freundschaft
0
480
gfnork node.js workshop Lesson #6 Unit testing
freundschaft
0
470
Other Decks in Programming
See All in Programming
Java 27新機能 / Java 27 new features
kishida
2
120
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
990
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
56
38k
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
110
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
380
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
310
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
Foundry Localでエージェント開発
seosoft
0
190
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
120
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Typedesign – Prime Four
hannesfritz
42
3.2k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
540
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
670
The World Runs on Bad Software
bkeepers
PRO
72
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Transcript
None
2
3
4 var app = connect() .use(connect.logger('dev')) .use(connect.static('public')) .use(function (req, res)
{ res.end('hello world\n'); }) http.createServer(app).listen(3000);
5 function SampleMiddleware(req, res, next) { next(); }
6
7
8 var http = require('http'); http.createServer(function (req, res) { res.writeHead(200,
{ 'Content-Type': 'text/plain' }); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');
9 var http = require('http'); http.createServer(function (req, res) { res.writeHead(200,
{ 'Content-Type': 'text/plain' }); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/'); var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send('hello world'); }); app.listen(3000);
10 e.g. http://examplewebsite/customers/showall http://examplewebsite/customers/add http://examplewebsite/customers/delete
11
12 https://github.com/visionmedia/consolidate.js app.engine('jade', require('jade').__express); app.set('view engine', 'jade');
13 res.render('email', { name: 'Tobi' }, function (err, html) {
// ... });
14
15
16
17