summaryrefslogtreecommitdiff
path: root/doc/api/domain.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/domain.md')
-rw-r--r--doc/api/domain.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/domain.md b/doc/api/domain.md
index 5ed1de4a4a..0f53e958bd 100644
--- a/doc/api/domain.md
+++ b/doc/api/domain.md
@@ -128,7 +128,7 @@ if (cluster.isMaster) {
// Anything can happen now! Be very careful!
try {
- // make sure we close down within 30 seconds
+ // Make sure we close down within 30 seconds
const killtimer = setTimeout(() => {
process.exit(1);
}, 30000);
@@ -148,7 +148,7 @@ if (cluster.isMaster) {
res.setHeader('content-type', 'text/plain');
res.end('Oops, there was a problem!\n');
} catch (er2) {
- // oh well, not much we can do at this point.
+ // Oh well, not much we can do at this point.
console.error(`Error sending 500! ${er2.stack}`);
}
});
@@ -240,13 +240,13 @@ perhaps we would like to have a separate domain to use for each request.
That is possible via explicit binding.
```js
-// create a top-level domain for the server
+// Create a top-level domain for the server
const domain = require('domain');
const http = require('http');
const serverDomain = domain.create();
serverDomain.run(() => {
- // server is created in the scope of serverDomain
+ // Server is created in the scope of serverDomain
http.createServer((req, res) => {
// Req and res are also created in the scope of serverDomain
// however, we'd prefer to have a separate domain for each request.
@@ -373,7 +373,7 @@ const d = domain.create();
function readSomeFile(filename, cb) {
fs.readFile(filename, 'utf8', d.intercept((data) => {
- // note, the first argument is never passed to the
+ // Note, the first argument is never passed to the
// callback since it is assumed to be the 'Error' argument
// and thus intercepted by the domain.