Skip to content
Myr

async.js

This file

Path

examples/async.js

13 lines · 233 bytes · JavaScript

Last changed by

gstvisionmediabefore adoption93c55b3

History of this file

Take it

Better examplesvisionmediabefore adoption44f1a5d

line 1why, one step back
1

Asynchronous handlers working.csausdevbefore adoptiona3ca40e

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

added logger to async examplecsausdevbefore adoption5734bd5

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

Better examplesvisionmediabefore adoption44f1a5d

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

Asynchronous handlers working.csausdevbefore adoptiona3ca40e

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

gstvisionmediabefore adoption93c55b3

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

Better examplesvisionmediabefore adoption44f1a5d

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

Asynchronous handlers working.csausdevbefore adoptiona3ca40e

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

Better examplesvisionmediabefore adoption44f1a5d

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