Documentation
    Preparing search index...

    The list routes command is used to view the list of registered routes

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    commandName: string = 'list:routes'

    The command name one can type to run the command

    description: string = 'List application routes. This command will boot the application in the console environment'

    The command description

    options: CommandOptions = ...

    Making sure to start the application so that the routes are imported

    match: string

    The match filter is used to find route by name, pattern and controller name that includes the match keyword

    middleware: string[]

    The middleware flag searches for the routes using all the mentioned middleware

    ignoreMiddleware: string[]

    The ignoreMiddleware flag searches for the routes not using all the mentioned middleware

    json: boolean

    The json flag is used to view list of routes as a JSON string.

    table: boolean

    The table flag is used to view list of routes as a classic CLI table

    kernel: Kernel

    Accessors

    • get staysAlive(): undefined | boolean

      Returns undefined | boolean

    • get startApp(): undefined | boolean

      Returns undefined | boolean

    Methods

    • The run method should include the implementation for the command.

      Returns Promise<void>

      async run() {
      this.logger.info('Running my command')
      return 'Command completed'
      }
    • The prepare template method is used to prepare the state for the command. This is the first method executed on a given command instance.

      Parameters

      • ..._: any[]

      Returns any

    • The interact template method is used to display the prompts to the user. The method is called after the prepare method.

      Parameters

      • ..._: any[]

      Returns any

    • The completed method is the method invoked after the command finishes or results in an error.

      You can access the command error using the this.error property. Returning true from completed method supresses the error reporting to the kernel layer.

      Parameters

      • ..._: any[]

      Returns any

    • Terminate the app. A command should prefer calling this method over the "app.terminate", because this method only triggers app termination when the current command is in the charge of the process.

      Returns Promise<void>