Compatibility layer for using Connect/Express middleware in diet.js apps
Use your favorite Express middleware out of the box
const compatible =const logger =const serve =...appapp
Proxies any assignment to req object by middleware to the signal object ($). For example, using express session usually adds .session to req; here it's attached to $
const session =appapp// refresh the page to see the counter go up
Known Incompatible Modules
body-parserDiet is inherently incompatible with Express' body parser, as Diet already does body parsing
Bug reports, feature requests, and questions are all welcome: open a GitHub issue and I'll get back to you.
This is especially true if a certain piece of middleware doesn't work. Please open an issue and I'll see what we need to do to get compatibility.