Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Ensure BAD domain example actually uses domain #5171

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc/api/domain.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down