Skip to main content

Module

@Module()#

Module Decorator is a Class Decorator which is help to register a Module into Expressive Tea. A module is a placeholder over a mount-point. We can be considerate a module like a container which provide isolation and modularity for our project. This module can be mounted in different applications and will move all the controller routes too.

On the modules will be defined a path (mount-point) where declared Controllers endpoints will be mounting on, also, will define all the Controllers and the dependency injection with a list of Providers.

Parameters
NameOptionalTypeDefaultsDescription
ModuleNoExpressiveTeaModulePropsExpressive Tea Module Class

Example

@Module({  controllers: [],  providers: [],  mountpoint: '/'})class Example {}