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

middleware injection #4

Open
ethicalvats opened this issue Oct 13, 2017 · 0 comments
Open

middleware injection #4

ethicalvats opened this issue Oct 13, 2017 · 0 comments

Comments

@ethicalvats
Copy link

Hey very nice article, I have been working as a freelancer developer for over 5 years on small and mid size web apps and was always wondering about the "enterprise patterns" for writing and maintaining code. I have been running my business solo picking on whatever new things come up on the way, be it any new technology or framework. I love the introduction to SOLID and getting to know the awesome InversifyJS.

While I kept your article bookmarked I landed on a client project for which I am willing to use the pattern suggested by you in that article. I have cleared the basics out and the app is running beautifully except I am stuck at a point from where I think you can only take me out.

Issue: I am trying to use an express middleware, multer which is used for multipart form-data parsing and allows to send over both the text fields and image files over the single request. I was able to work with body parser until file upload became a necessity.

I have searched a lot over the internet regarding injecting the middlewares into the controller needless to say I found a lot of approaches but no one is quite compatible to the architecture what you have suggested or may be I am missing out on something.

I would be thankful to you if you can include any example or a code snippet suggesting a way to inject the middleware into the controllers, thanks

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

No branches or pull requests

1 participant