0.0.3 • Published 8 years ago

connect-settimeout v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

connect-settimeout

a connect middleware that runs a provided function if a request lasts longer than a given duration

Build Status Coverage Status

NPM

Setup:

Add this middleware to your connect or express app like this:

var connectSetTimeout = require('connect-settimeout');
app.use(connectSetTimeout(function(req, res){
  // do whatever you want with the slow request, eg:
  console.error("There was a slow response at ", req.method, req.url);
}, 10000));  // 10 seconds, specified in milliseconds
0.0.3

8 years ago

0.0.2

9 years ago

0.0.1

10 years ago

0.0.0

10 years ago