Questions & Answers

How can I enable and use dependency injection?

Deepkit HTTP
50 up-votes
Warning: The answer is generated by an artificial intelligence. It might not be correct.
To adjust rating, open the thread in Discord and click on the up/down vote button.

Once you use new App with either import HttpModule or FrameworkModule, dependency injection is automatically available for all controllers and functional routes. You can use constructor injection or function parameter injection to inject dependencies into your controller actions or functional routes.