Skip to content
Myr

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 file

Take 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 back
1
2var 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 back
17 res.send('Hello World')

docs: fix GitHub capitalizationPiper Chesterbefore adoption43dff4c

lines 18–20why, one step back
18});
1920app.listen(3333);