Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InitControllersOptions<TApp>

Options for 'initControllers()' function.

Type parameters

Hierarchy

  • InitControllersOptions

Index

Properties

app

The underlying Express host or router.

Optional controllerClass

controllerClass: string | ControllerClassNameProvider

The custom name for the controller class or a function that provides it. Default 'Controller'

Optional controllerConstructorArgs

controllerConstructorArgs: ControllerClassConstructorArgsProvider | ArrayLike<any>

The custom list of arguments for a controller class contructor or the function that provides it.

Optional cwd

cwd: string

The custom current work directory. Default: '{PROCESS}/controllers'

Optional events

events: { onControllerCreated?: ControllerCreatedEventHandler<TApp>; onFileLoaded?: ControllerFileLoadedEventHandler; onFileLoading?: ControllerFileLoadingEventHandler }

Events.

Type declaration

Optional files

files: string | string[]

One or more custom glob patterns of files to scan. Default: [ *.js ] or [ *.ts ]

Optional filter

Filter function for scanned files (s. 'files').

Optional swagger

Swagger options.

Generated using TypeDoc