![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
express-simple-timing
Advanced tools
Express middleware that sends Server-Timing stats for routes
Express middleware that sets Server Timing API headers and optionally sends timers to stats systems.
express-simple-timing
returns a middleware function that can be used with an express server. It sends Server-Timing
headers to the client to allow inspection of route timings. It can also send stats to your stats system by using a callback passed into the constructor.
A default key of total
is created based on the total time to deliver the entire route.
npm install --save express-simple-timing
const simpleTiming = require('express-simple-timing');
const router = require('express').Router();
router.use(simpleTiming());
module.exports = router.put('/mypath', function(req, res) {
res.json({
message: 'my response'
});
});
This will add a total value by default, such as:
server-timing: total;dur=4.043
By using the serverTimingStart
and serverTimingEnd
methods you can send ad hoc metrics for your app:
res.serverTimingStart('woof');
barkLikeADog();
res.serverTimingEnd('woof');
This will then add an additional timing header:
server-timing: woof;dur=2.43
To use the timing metrics in your own stats system, you can pass a callback which receives req
, key
and value
every time a server-timing header is added.
const myStats = require('my-stats-system');
const simpleTiming = require('express-simple-timing');
const router = require('express').Router();
function myStatsHook(req, key, value) {
myStats(req.url, key, value);
}
router.use(simpleTiming(myStatsHook));
npm test
FAQs
Express middleware that sends Server-Timing stats for routes
The npm package express-simple-timing receives a total of 125 weekly downloads. As such, express-simple-timing popularity was classified as not popular.
We found that express-simple-timing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.