async.js
This file
Path
examples/async.js
12 lines · 232 bytes · JavaScript
Last changed by
merged from upstreamcsausdevbefore adoptiona3acc21
History of this fileTake it
Asynchronous handlers working.csausdevbefore adoptionaa3167e
lines 1–3why, one step back1require.paths.unshift("./lib")2require('express')3added logger to async examplecsausdevbefore adoptiona2f98e1
lines 4–5why, one step back4use(Express.Logger)5merged from upstreamcsausdevbefore adoptiona3acc21
line 6why, one step back6get('/wait/:ms', function() {Asynchronous handlers working.csausdevbefore adoptionaa3167e
line 7why, one step back7 setTimeout(function() {merged from upstreamcsausdevbefore adoptiona3acc21
lines 8–9why, one step back8 halt('Waited ' + param('ms') + ' milliseconds before replying')9 }, param('ms'))Asynchronous handlers working.csausdevbefore adoptionaa3167e
lines 10–11why, one step back10});11merged from upstreamcsausdevbefore adoptiona3acc21
line 12why, one step back12Express.start()