Documentation
    Preparing search index...
    • Mount dynamic module.

      Constructs a module instance with directory path of controller classes.

      Every controller classes in the target directory would be dynamically mounted.

      Parameters

      • path: string | string[] | { exclude?: string[]; include: string[] }

        Path of controllers

      • metadata: Omit<ModuleMetadata, "controllers"> = {}

        Additional metadata except controllers

      • OptionalisTsNode: boolean

        Select TypeScript source files explicitly; otherwise compiled JavaScript is tried first, with a source fallback under ttsx.

      Returns Promise<typeof NestiaModule>

      Module instance

      contracts/common.md#principled-implementation Controllers are loaded from the paths, given as a path, a list, or include and exclude lists, and then a class decorated with @Module and those controllers is returned, so Nest treats the result as an ordinary module.

      contracts/common.md#clear-and-simple-design A short function whose discovery details live in load_controllers.

      contracts/common.md#prohibited-implementation-shortcuts It calls Nest's public Module decorator with the metadata; nothing is patched.

      contracts/common.md#meaningful-documentation The comment documents the path forms and the isTsNode option.

      contracts/portability.md#os-neutral-implementation Controller discovery delegates native path handling to SourceFinder and conversion of import paths to file URLs to load_controllers; module metadata contains controller constructors rather than filesystem identities.