1.8.0 • Published 7 years ago

timeout-request v1.8.0

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
7 years ago

timeout-request

NPM version Linux Status Windows Status Dependency Status Coveralls

Set the number of milliseconds that a script is allowed to run in nodejs. If this timeout is reached, res.end() or custom callback will be called

Installation

Install through NPM

npm install timeout-request

or

git clone git://github.com/hex7c0/timeout-request.git

API

inside expressjs project

var timeout = require('timeout-request');

var app = require('express')();

app.use(timeout());

timeout(options)

options

  • milliseconds - Number Number of milliseconds before callback (default "5000")
  • header - Boolean If enabled, check res._header before callback (default "false")
  • data - Object Object passed to custom callback after req and res (default "null")
  • callback - Function Custom callback instead of res.end (default "null")

Examples

Take a look at my examples

License Apache2

1.8.0

7 years ago

1.7.0

8 years ago

1.6.0

8 years ago

1.5.0

9 years ago

1.4.3

10 years ago

1.4.2

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.0

11 years ago

1.2.1

11 years ago

1.2.0

11 years ago

1.1.7

11 years ago

1.1.6

11 years ago

1.1.5

11 years ago

1.1.4

11 years ago

1.1.3

11 years ago

1.1.2

11 years ago

1.1.1

11 years ago

1.1.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.0.1

11 years ago