async.js
This file
Path
examples/async.js
12 lines · 360 bytes · JavaScript
Last changed by
added logger to async examplecsausdevbefore adoption5734bd5
History of this fileTake it
Asynchronous handlers working.csausdevbefore adoptiona3ca40e
lines 1–3why, one step back1require.paths.unshift("./lib")2require('express')3added logger to async examplecsausdevbefore adoption5734bd5
lines 4–5why, one step back4use(Express.Logger)5Asynchronous handlers working.csausdevbefore adoptiona3ca40e
lines 6–12why, one step back6get('hello/:value/:time', function() {7 setTimeout(function() {8 Express.server.finished('<html><head><title>Asynchronous Example</title></head><body><h1>Hello '+param('value')+', I waited '+param('time')+'ms to talk to you.</h1></body></html>')9 }, param('time'))10});1112Express.start();