{% hint style="warning" %} We moved all middlewares to separate @nanoexpress/middlewares repository {% endhint %}
- body-parser (yes, if you don't want built-in)
- express-fileupload
- express-cors
- express-jwt
- express-session
- express-graphql
- passport
app.use((req, res, next) => {
req.appId = 'MY_APP_ID';
next();
});
function lazyEnd(end) {
setTimeout(() => this.end(end), 0);
}
app.use((req, res, next) => {
res.lazyEnd = lazyEnd;
next();
});
{% hint style="info" %} Error which comes from Async Middleware automacilly will be handled by nanoexpress {% endhint %}