Inspired by koa-response-time
Response time checker for Node.js. Sets X-Response-Time header using process.hrtime()
pnpm i @tinyhttp/ping
import { ping } from '@tinyhttp/ping'
Round the ping time. Default is set to true.
import { ping } from '@tinyhttp/ping' import { createServer } from 'http' import path from 'path' createServer(async (req, res) => { ping()(req, res) res.end('Hello World') }).listen(3000)