|
@ -48,9 +48,11 @@ d.on('error', function(er) { |
|
|
// This is no better than process.on('uncaughtException')! |
|
|
// This is no better than process.on('uncaughtException')! |
|
|
console.log('error, but oh well', er.message); |
|
|
console.log('error, but oh well', er.message); |
|
|
}); |
|
|
}); |
|
|
|
|
|
d.run(function() { |
|
|
require('http').createServer(function(req, res) { |
|
|
require('http').createServer(function(req, res) { |
|
|
handleRequest(req, res); |
|
|
handleRequest(req, res); |
|
|
}).listen(PORT); |
|
|
}).listen(PORT); |
|
|
|
|
|
}); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
By using the context of a domain, and the resilience of separating our |
|
|
By using the context of a domain, and the resilience of separating our |
|
|