inversify-express-example
inversify-express-example copied to clipboard
Middleware after controller
Context
How can I chain a middleware to be called after the controller function? I'm writing a middleware that automatically reads the response object and set the correct http status code. What I want to do is just like this example using regular express.js
router.get('/route', middleware1, controllerFn, middleware2)
Your Environment
- Version used: inversify: ^5.0.1 | inversify-express-utils: ^6.3.2
- Environment name and version: node 10.15.3
- Operating System and version (desktop or mobile): Linux popOS 5.3.0-7629-generic
+1