Skip to content
Browse files

Ensure BAD domain example actually uses domain

  • Loading branch information...
1 parent 9b8dd39 commit fcc4cdbcb31279f134162515e97ad86984f5e9ec @mhart committed Mar 30, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 doc/api/domain.markdown
View
8 doc/api/domain.markdown
@@ -48,9 +48,11 @@ d.on('error', function(er) {
// This is no better than process.on('uncaughtException')!
console.log('error, but oh well', er.message);
});
-require('http').createServer(function(req, res) {
- handleRequest(req, res);
-}).listen(PORT);
+d.run(function() {
+ require('http').createServer(function(req, res) {
+ handleRequest(req, res);
+ }).listen(PORT);
+});
```
By using the context of a domain, and the resilience of separating our

0 comments on commit fcc4cdb

Please sign in to comment.
Something went wrong with that request. Please try again.