I love micro, it just makes building small apps a sinch. But then I'm a total Zeit fanboy.
If you're really want to functionify it. Where you apply your middlewares with micro you could compose with lambda or some other functional library.
const compose = require('some-functional-library/compose') const applyMiddlwares = compose( health, log, cors, rateLimit, ) module.exports = applyMiddlewares(handler)
Yep, I mean compose is just a reduce away isn't it?
😉
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I love micro, it just makes building small apps a sinch. But then I'm a total Zeit fanboy.
If you're really want to functionify it. Where you apply your middlewares with micro you could compose with lambda or some other functional library.
Yep, I mean compose is just a reduce away isn't it?
😉