Skip to content

Commit 2ee17ea

Browse files
committed
[doc] Server object option property mismatch/typo
In the current docs for `v8.0.x`, it appears that there may be a mismatch in the `Server` object property `load`. I've simply changed `load.sampleInterface` to `load.sampleInterval` When following documentation one will get an error similar to: ``` /Users/blakmatrix/projects/hapidays/code/node_modules/joi/lib/index.js:121 throw new Error(message + error.annotate()); ^ Error: Invalid load monitoring options { "sampleInterval": 0, "sampleInterface" [1]: 1 } [1] sampleInterface is not allowed at root.assert (/Users/blakmatrix/projects/hapidays/code/node_modules/joi/lib/index.js:121:19) at new module.exports.internals.Heavy (/Users/blakmatrix/projects/hapidays/code/node_modules/hapi/node_modules/heavy/lib/index.js:41:9) at new module.exports.internals.Server (/Users/blakmatrix/projects/hapidays/code/node_modules/hapi/lib/server.js:46:19) at Object.<anonymous> (/Users/blakmatrix/projects/hapidays/code/app.js:7:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) ```
1 parent 1e47a08 commit 2ee17ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

API.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ var Hapi = require('hapi');
211211
var server = new Hapi.Server({
212212
cache: require('catbox-redis'),
213213
load: {
214-
sampleInterface: 1000
214+
sampleInterval: 1000
215215
}
216216
});
217217
```
@@ -302,7 +302,7 @@ An object containing the process load metrics (when `load.sampleInterval` is ena
302302

303303
```js
304304
var Hapi = require('hapi');
305-
var server = new Hapi.Server({ load: { sampleInterface: 1000 } });
305+
var server = new Hapi.Server({ load: { sampleInterval: 1000 } });
306306

307307
console.log(server.load.rss);
308308
```

0 commit comments

Comments
 (0)