Created
February 7, 2025 21:42
-
-
Save UltiRequiem/2ed2aff53a8db1026ca31c24604ff3df to your computer and use it in GitHub Desktop.
express goes brrr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REMOVE MONDAY | |
app.use((req, res, next) => { | |
const start = Date.now(); | |
res.on("finish", () => { | |
const duration = Date.now() - start; | |
console.log(`PROFILER: [${req.method}] ${req.originalUrl} - ${duration}ms`); | |
}); | |
next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment