Dependency Injection
Understanding the DI container and dependency resolution in Dwex
Dependency Injection
Learn how Dwex's dependency injection system works and how to leverage it in your applications.
This page is under construction. Documentation coming soon!
Overview
Dwex uses a powerful dependency injection container inspired by NestJS, optimized for Bun's performance.
Basic Usage
@Injectable()
export class UserService {
constructor(private readonly db: DatabaseService) {}
}Topics Covered
- How the DI container works
- Constructor injection
- Property injection
- Injection tokens
- Provider registration
- Dependency resolution