From 52ffb24b38c2fb305743007090021a68a336376c Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Mon, 23 Jul 2012 11:43:32 -0700 Subject: [PATCH] Update Readme.md --- Readme.md | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/Readme.md b/Readme.md index 1d2e262..8ee3280 100644 --- a/Readme.md +++ b/Readme.md @@ -1,36 +1,2 @@ -# Connect-timeout middleware -Connect timeout sets a global timeout for responses. - -## Usage - - connect.createServer( - require('./path/to/connect-timeout')({options}) - ) - -### Options - -#### Code - -Error code to respond with in case of timeout (500) - -#### Time - -Number of ms after which the timeout is triggered (8000) - -## What about long-running requests? - -When the timeout is enabled, a `clearTimeout` method is attached to the request. - - function(req, res, next){ - req.clearTimeout(); - setTimeout(function(){ - res.writeHead(200); - res.end(); - // this will work - }, 20000); - } - -## Author - -Guillermo Rauch <guillermo@learnboost.com> \ No newline at end of file + Use connect's bundled `connect.timeout(ms)` \ No newline at end of file