Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

server-timing

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server-timing

This module can add `ServerTiming` Header to http response, and be able to use express middleware

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by1.66%
Maintainers
1
Weekly downloads
 
Created
Source

server-timing

This module adds Server-Timing to response headers.

You can use this as a express module / basic http function.

Install

$ npm install server-timing -S

Usage

const express = require('express')
const app = express()
app.use(serverTiming())

app.use((req, res, next) => {
  res.setMetric('db', 100.0, "Database metric");
  res.setMetric('api', 200.0, "HTTP/API metric");
  res.setMetric('cache', 300.0, "cache metric");
  next();
});

Result

image

Keywords

FAQs

Package last updated on 08 Feb 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc