Skip to content
Myr

async.js

This file

Path

examples/async.js

12 lines · 232 bytes · JavaScript

Last changed by

Merge branch 'master' of git://github.com/csausdev/express into devvisionmediabefore adoption33ea221

History of this file

Take it

Asynchronous handlers working.csausdevbefore adoptiona3ca40e

lines 1–3why, one step back
1require.paths.unshift("./lib")
2require('express')3

added logger to async examplecsausdevbefore adoption5734bd5

lines 4–5why, one step back
4use(Express.Logger)
5

Better examplesvisionmediabefore adoption44f1a5d

line 6why, one step back
6get('/wait/:ms', function() {

Asynchronous handlers working.csausdevbefore adoptiona3ca40e

line 7why, one step back
7 setTimeout(function() {

gstvisionmediabefore adoption93c55b3

line 8why, one step back
8 halt('Waited ' + param('ms') + ' milliseconds before replying')

Better examplesvisionmediabefore adoption44f1a5d

line 9why, one step back
9 }, param('ms'))

Asynchronous handlers working.csausdevbefore adoptiona3ca40e

lines 10–11why, one step back
10});
11

Better examplesvisionmediabefore adoption44f1a5d

line 12why, one step back
12Express.start()