Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Middleware after controller #485

@vitorfreitas

Description

@vitorfreitas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions