Plugins
Sincev4.0
Plugins are a way to enable pre-built integrations with other libraries and frameworks. They are a convenient way to enable many real-world use-cases without having to write much boilerplate code.
Plugins can hook into the lifecycle of the ClsModule
and the CLS context setup of the Cls-
initializers. They can also provide their own Proxy- and regular providers to be used in the application.
Usage
To use a plugin, pass it to the forRoot
method of the ClsModule
:
ClsModule.forRoot({
plugins: [new MyPlugin()],
});
Available plugins
For a list of plugins managed by the author of nestjs-cls
, see the Available Plugins page.
Creating a plugin
To create a custom plugin, see the Plugin API reference.