doc: replace anonymous function with arrow function
PR-URL: https://github.com/nodejs/node/pull/24617 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
This commit is contained in:
parent
85aa53a1c9
commit
9fe02af794
@ -444,14 +444,14 @@ function main(conf) {
|
|||||||
const http = require('http');
|
const http = require('http');
|
||||||
const len = conf.kb * 1024;
|
const len = conf.kb * 1024;
|
||||||
const chunk = Buffer.alloc(len, 'x');
|
const chunk = Buffer.alloc(len, 'x');
|
||||||
const server = http.createServer(function(req, res) {
|
const server = http.createServer((req, res) => {
|
||||||
res.end(chunk);
|
res.end(chunk);
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(common.PORT, function() {
|
server.listen(common.PORT, () => {
|
||||||
bench.http({
|
bench.http({
|
||||||
connections: conf.connections,
|
connections: conf.connections,
|
||||||
}, function() {
|
}, () => {
|
||||||
server.close();
|
server.close();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user