repo.or.cz
/
express.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
build: mocha@9.2.1
[express.git]
/
benchmarks
/
middleware.js
blob
df4df2c5ac50445499eaa0bc1b7aa0646cabeb59
1
2
var express = require('..');
3
var app = express();
4
5
// number of middleware
6
7
var n = parseInt(process.env.MW || '1', 10);
8
console.log(' %s middleware', n);
9
10
while (n--) {
11
app.use(function(req, res, next){
12
next();
13
});
14
}
15
16
app.use(function(req, res, next){
17
res.send('Hello World')
18
});
19
20
app.listen(3333);