0.0.2 • Published 12 years ago

http-time v0.0.2

Weekly downloads
1
License
-
Repository
github
Last release
12 years ago

httpTime

A stream module to capture and output the amount of time of a http request.

Using streams, you can pipe the request through the start and stop streams to capture and log the time of the request.

Usage

var http = require('http'),
  httpTime = require('httpTime');

http.createServer(function(req,res) {
  req
    .pipe(httpTime.start(req))
    .pipe(...)
    .pipe(httpTime.stop(req))
    .pipe(res);
}).listen(3000);

or with event-stream

var http = require('http'),
  es = require('event-stream'),
  httpTime = require('httpTime');

http.createServer(function(req,res) {
  es.pipeline(
    req,
    httpTime.start(req),
    ...,
    httpTime.stop(req),
    res
  );
}).listen(3000);
0.0.2

12 years ago

0.0.1

12 years ago