Skip to Content
HeronJS v4 is now available.
4.0.0HTTPProvider

HTTP Providers

HTTP controllers receive application-owned dependencies through constructor injection. Define injectable providers and register them in the module’s providers array alongside its controllers.

The dependency injection guide includes a complete provider/controller example, typed tokens and disposal rules.

Use constructors or Token<T> to preserve types at registration and resolution. String or symbol lookups return unknown; validate them before use. Import Inject and module/DI APIs from @heronjs/common, and HTTP decorators from @heronjs/express.

Decorators declare metadata; they do not install a global container or automatically register application instances. Each application owns its container and registry.

Last updated on