mirror of https://github.com/nodejs/node.git
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>pull/24524/head
parent
85aa53a1c9
commit
9fe02af794
|
@ -444,14 +444,14 @@ function main(conf) {
|
|||
const http = require('http');
|
||||
const len = conf.kb * 1024;
|
||||
const chunk = Buffer.alloc(len, 'x');
|
||||
const server = http.createServer(function(req, res) {
|
||||
const server = http.createServer((req, res) => {
|
||||
res.end(chunk);
|
||||
});
|
||||
|
||||
server.listen(common.PORT, function() {
|
||||
server.listen(common.PORT, () => {
|
||||
bench.http({
|
||||
connections: conf.connections,
|
||||
}, function() {
|
||||
}, () => {
|
||||
server.close();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue