Dependencies such as a database abstraction or logger can be handled by leveraging the power of Dependency Injection. These dependencies can be injected into controller methods or functional API routes via constructor injection or function parameter injection. For example:
class UserController { constructor(private database: Database) {} @http.GET('/user/:id') getUser(id: number) { // Use the database abstraction } } const app = new App({ controllers: [UserController], imports: [new FrameworkModule()], providers: [Database] });