Optional
bootstrapOptional
configConfiguration definition.
class MyModuleConfig {
debug: boolean = false;
});
class MyModule extends createModule({
config: MyModuleConfig
});
Optional
controllersCLI controllers.
Optional
exportsExport providers (its token provide
value) or modules you imported first.
Optional
forWhether all services should be moved to the root module/application.
Optional
importsModules can not import other modules in the module definitions. Use instead:
class MyModule extends createModule({}) {
imports = [new AnotherModule];
}
or
class MyModule extends createModule({}) {
process() {
this.addModuleImport(new AnotherModule);
}
}
or switch to functional modules
function myModule(module: AppModule) {
module.addModuleImport(new AnotherModule);
}
Optional
listenersEvent listeners.
with simple functions
{
listeners: [
onEvent.listen((event: MyEvent) => {console.log('event triggered', event);}),
]
}
with services
class MyListener {
@eventDispatcher.listen(onEvent)
onEvent(event: typeof onEvent['type']) {
console.log('event triggered', event);
}
}
{
listeners: [
MyListener,
]
}
Optional
middlewaresHTTP middlewares.
Optional
providersProviders.
Optional
workflowsRegister created workflows. This allows the Framework Debugger to collect debug information and display the graph of your workflow.
Generated using TypeDoc
Module bootstrap class|function. This class is instantiated or function executed on bootstrap and can set up various injected services.