middleware.js
This file
Path
benchmarks/middleware.js
20 lines · 312 bytes · JavaScript
Last changed by
Use safe-buffer for improved Buffer APIDouglas Christopher Wilsonbefore adoption12c3712
History of this fileTake it
The walk stopped after 200 commits: lines older than 43dff4c point at it.
docs: fix GitHub capitalizationPiper Chesterbefore adoption43dff4c
lines 1–16why, one step back12var express = require('..');3var app = express();45// number of middleware67var n = parseInt(process.env.MW || '1', 10);8console.log(' %s middleware', n);910while (n--) {11 app.use(function(req, res, next){12 next();13 });14}1516app.use(function(req, res, next){Use safe-buffer for improved Buffer APIDouglas Christopher Wilsonbefore adoption12c3712
line 17why, one step back17 res.send('Hello World')docs: fix GitHub capitalizationPiper Chesterbefore adoption43dff4c
lines 18–20why, one step back18});1920app.listen(3333);