Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registering controllers to modules instead of global scope #930

Open
remojansen opened this issue Jul 31, 2018 · 3 comments
Open

Registering controllers to modules instead of global scope #930

remojansen opened this issue Jul 31, 2018 · 3 comments

Comments

@remojansen
Copy link
Member

Imported from inversify/inversify-express-utils#201

I've noticed that controllers are automatically registered to global scope when they are imported. A cleaner way would be to allow each package to export its controllers and then load them into the required container, as with any other dependencies.

Is there a way to do so now or would I need to implement this feature?

-- @shlomokraus

Also looking at this. Spent a good bit of time scratching my head because I'm pulling in multiple Express apps into a single server and then routing across them by hostname, and the behavior was not what I expected.
-- @eropple

@remojansen
Copy link
Member Author

@shlomokraus @eropple I think this is a good idea. We need to come up with a proposal for potential changes in the API and once we all agree we will be able to implement it. PRs are welcome so if you guys would like to contribute we should be able to help and guide you.

@shlomokraus
Copy link

@remojansen Why is that relevant for the main repo?
I thought this is a behavior of the express-utils project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants