Class: Cli

Cli

new Cli(opts)

Parameters:
Name Type Description
opts Object CLI options
Properties
Name Type Attributes Description
run function The function called when you should run the bridge. The first arg is the port to listen on. The second are is the parsed config object if set.
generateRegistration function The function called when you should generate a registration. The first arg is the provided --url string, the second arg is a callback function which should be invoked with the AppServiceRegistration when the registration is generated.
bridgeConfig Object <optional>
Bridge-specific config info. If null, no --config option will be present in the CLI. Default: null.
Properties
Name Type Attributes Description
affectsRegistration boolean <optional>
True to make the --config option required when generating the registration. The parsed config can be accessed via Cli.getConfig().
schema string | Object Path to a schema YAML file (string) or the parsed schema file (Object).
defaults Object <optional>
The default options for the config file.
enableRegistration boolean <optional>
Enable '--generate-registration'. Default True.
registrationPath string <optional>
The path to write the registration file to.
Source:

Methods

getConfig() → (nullable) {Object}

Get the loaded and parsed bridge config. Only set after run() has been called.
Source:
Returns:
The config
Type
Object

run()

Run the app from the command line. Will parse sys args.
Source: