
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
koa-response-time
Advanced tools
X-Response-Time middleware for Koa.
$ npm install koa-response-time
Basic usage:
const Koa = require('koa');
const responseTime = require('koa-response-time');
const app = new Koa();
app.use(responseTime());
If you need response high resolution in nano time, set hrtime
option to true
:
app.use(responseTime({ hrtime: true }));
Sample response header with hrtime = false
(default):
X-Response-Time: 153ms
Sample response header with hrtime = true
:
X-Response-Time: 153.123581ms
Best to .use()
at the top before any other middleware,
to wrap all subsequent middleware.
MIT
FAQs
X-Repsonse-Time middleware for koa
The npm package koa-response-time receives a total of 4,886 weekly downloads. As such, koa-response-time popularity was classified as popular.
We found that koa-response-time demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.