New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fh-request-timer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fh-request-timer

Express middleware to add a timer to all requests, sending the result to RHMAP stats and optionally adding the time taken as a response header

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

Keywords

express

FAQs

Package last updated on 16 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts