@loopstack/module-config-example
Demonstrates configurable module patterns (forRoot + forFeature) and per-module configuration isolation using a shared GreeterTool.
By using this example you’ll get…
- A reusable
GreeterModulewith global defaults viaforRoot - Multiple consumer modules overriding config independently via
forFeature - A nested passthrough module (
GreeterAgentModule) that forwards feature config
Installation
npm install @loopstack/module-config-exampleHow It Works
The exported ModuleConfigExampleModule wires four scenarios:
DefaultGreetingModuleuses global defaults fromGreeterModule.forRoot(...).GermanGreetingModuleoverrides to German withforFeature(...).FrenchGreetingModuleoverrides to French and runs alongside German to prove isolation.NestedGreetingModulereceives config through a wrapper module to demonstrate nested pass-through.
Each workflow calls the same greeter tool and writes the resulting greeting to a MessageDocument.
Public API
ModuleConfigExampleModuleGreeterModuleGreeterAgentModuleDefaultGreetingModule,DefaultGreetingWorkflowGermanGreetingModule,GermanGreetingWorkflowFrenchGreetingModule,FrenchGreetingWorkflowNestedGreetingModule,NestedGreetingWorkflowGreeterTool
Dependencies
@loopstack/common
Last updated on