Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AppRunner

Index

Constructors

constructor

Properties

Private Readonly logger

logger: Logger = ...

Methods

createApp

  • createApp(loaderProperties: IComponentsManagerBuilderOptions<App>, configFile: string, variables: Record<string, any> | CliParams): Promise<App>
  • Creates the main app object to start the server from a given config.

    Parameters

    • loaderProperties: IComponentsManagerBuilderOptions<App>

      Components.js loader properties.

    • configFile: string

      Path to a Components.js config file.

    • variables: Record<string, any> | CliParams

      Variables to pass into the config file.

    Returns Promise<App>

Protected createVariables

  • createVariables(params: CliParams): Record<string, any>

run

  • run(loaderProperties: IComponentsManagerBuilderOptions<App>, configFile: string, variableParams: CliParams): Promise<void>
  • Starts the server with a given config. This method can be used to start the server from within another JavaScript application.

    Parameters

    • loaderProperties: IComponentsManagerBuilderOptions<App>

      Components.js loader properties.

    • configFile: string

      Path to the server config file.

    • variableParams: CliParams

      Variables to pass into the config file.

    Returns Promise<void>

runCli

  • runCli(__namedParameters?: { argv?: string[]; stderr?: WriteStream; stdin?: ReadStream; stdout?: WriteStream }): void
  • Starts the server as a command-line application. Made non-async to lower the risk of unhandled promise rejections.

    Parameters

    • __namedParameters: { argv?: string[]; stderr?: WriteStream; stdin?: ReadStream; stdout?: WriteStream } = {}
      • Optional argv?: string[]
      • Optional stderr?: WriteStream

        Standard error stream.

      • Optional stdin?: ReadStream
      • Optional stdout?: WriteStream

    Returns void