Skip to content
Myr

middleware.js

This file

Path

benchmarks/middleware.js

22 lines · 343 bytes · JavaScript

Last changed by

lint: remove all unused varaiblesDouglas Christopher Wilsonbefore adoptione006622

History of this file

Take it

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

examples: comment the usage of process.nextTickMuhammad Saqibbefore adoptiondd2b897

lines 1–22why, 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}1516var body = new Buffer('Hello World');1718app.use(function(req, res, next){19 res.send(body);20});2122app.listen(3333);