Skip to content
Myr

middleware.js

This file

Path

benchmarks/middleware.js

20 lines · 306 bytes · JavaScript

Last changed by

Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae

History of this file

Take it

The walk stopped after 200 commits: lines older than 0ee4dd8 point at it.

deps: serve-static@~1.4.2Douglas Christopher Wilsonbefore adoption0ee4dd8

lines 1–15why, 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}15

Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae

line 16why, one step back
16app.use(function(req, res){

Merge tag '4.16.2'Douglas Christopher Wilsonbefore adoption62e12fe

line 17why, one step back
17 res.send('Hello World')

deps: serve-static@~1.4.2Douglas Christopher Wilsonbefore adoption0ee4dd8

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