Wish more modules would expose a `function (req, res) {}` interface. Perhaps with `, next)` too. We need more composable HTTP modules
-
Show this thread
-
Replying to @yoshuawuyts
that interface has a problem, as it assumes you attaching info to req/res. It’s an antipattern for perf code in. V8.
2 replies 0 retweets 1 like -
Replying to @matteocollina
are you saying passing req, res around causes deopts? In this case I find myself rewriting lots of code; having more like^ would speed it up
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
changing the shape of Req and Res causes deopts and it results in less optimized code. cc
@bmeurer2 replies 0 retweets 3 likes
Replying to @matteocollina @bmeurer
Oh! Yeah no I'd never advocate for that. I like myself a (req, res, ctx) interface for that reason. Was thinkin likehttps://github.com/rvagg/github-webhook-handler …
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.