1.0.1 • Published 8 years ago

fh-request-timer v1.0.1

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

fh-request-timer

A simple request timer middleware for express apps that logs request time to the Red Hat Mobile Application Platform, as well as adding an optional x-fh-timer header to each response.

Implementation

// require module
var reqTimer = require('fh-request-timer');

// include timer middleware
app.use(reqTimer());

Configuration

To remove the x-fh-timer from the response, pass the option {addHeader:false} when calling the middleware:

// include timer middleware
app.use(reqTimer({addHeader: false}));

Run Unit Tests

npm install
npm test