1

This is a TypeScript question, but that shouldn't matter.

Would you use dependency injection to get access to your controllers inside your router files, or would you just import them?

Comments
  • 2
    As long as DI clauses are typed, I find them more conventional.
  • 2
    Hundo P use DI. Much easier to debug routes later and you can implement isolated generative test suites for your endpoints.
Add Comment