Interface: EntrypointOptions
The options of the Entrypoint component: its controllers, middlewares and access rules, and the adapters receiving the requests of each channel. Any other key is the name of a channel and takes that channel's adapters (the packages providing a channel add their key to this interface by declaration merging); an adapter given under another channel's key, or a key which is neither an option nor an adapter, fails the entrypoint's initialization with an InvalidEntrypointAdapterException. Build them with buildEntrypoints.
Properties
cli?
optionalcli?:CLIEntrypoint|EntrypointAdapter<CLIContext<{ }>> | (CLIEntrypoint|EntrypointAdapter<CLIContext<{ }>>)[]
The adapters (or 2.x entrypoint functions) receiving the CLI requests, such as commanderCLIEntrypoint().
cliActionGroups?
optionalcliActionGroups?:Record<string,string>
The CLI action groups: each group id (used in the actions' groups option) mapped to its display name. An action in a group not listed here fails the entrypoint's initialization with an InvalidActionGroupException.
Default
{}controllers
controllers:
IBaseObjectConstructor<Controller>[]
The controller classes whose actions the entrypoint serves. They are registered in the entrypoint's container; an action declared in a parent controller is served by each registered subclass.
http?
optionalhttp?:HTTPEntrypoint|EntrypointAdapter<HTTPContext<{ }>> | (HTTPEntrypoint|EntrypointAdapter<HTTPContext<{ }>>)[]
The adapters (or 2.x entrypoint functions) receiving the HTTP requests, such as expressHTTPEntrypoint().
httpActionGroups?
optionalhttpActionGroups?:Record<string,string>
The HTTP action groups: each group id (used in the actions' groups option) mapped to its display name. An action in a group not listed here fails the entrypoint's initialization with an InvalidActionGroupException.
Default
{}middlewares?
optionalmiddlewares?:MiddlewareDefinition[]
The middlewares run around every action of every channel, in order, before the ones of the adapter, of the controller class and of the action.
Default
[]queue?
optionalqueue?:EntrypointAdapter<QueueContext<{ }>> |EntrypointAdapter<QueueContext<{ }>>[]
The adapter delivering the messages of the queues to the @QueueAction actions (queueEntrypoint).
rules?
optionalrules?:IBaseObjectConstructor<AccessControlRule<BaseContext<Record<string,any>>>>[]
The access control rule classes checked for the actions declared with acl: true, in order; a rule is skipped for the contexts not in its supportContextTypes.
Default
[]schedule?
optionalschedule?:EntrypointAdapter<ScheduleContext<{ }>> |EntrypointAdapter<ScheduleContext<{ }>>[]
The schedule adapter running the actions declared with @Schedule (scheduleEntrypoint()); without it they never run.
service?
optionalservice?:ServiceEntrypoint|EntrypointAdapter<ServiceContext<{ }>> | (ServiceEntrypoint|EntrypointAdapter<ServiceContext<{ }>>)[]
The adapters (or 2.x entrypoint functions) receiving the service requests, such as socketIOServiceEntrypoint().
serviceActionGroups?
optionalserviceActionGroups?:Record<string,string>
The service action groups: each group id (used in the actions' groups option) mapped to its display name. An action in a group not listed here fails the entrypoint's initialization with an InvalidActionGroupException.
Default
{}shutdownTimeout?
optionalshutdownTimeout?:number
The time in milliseconds given to the requests in progress when the entrypoint stops; the ones still running after it are aborted, and fail with an EntrypointStoppedException.
Default
30000