appUtils

The APP Utils module

Methods

static defaultConfiguration()

Initialize application configuration.

static loadDefaultComponents()

Load default components for application.

static optComponents(comps, method, cb)

Apply command to loaded components. This method would invoke the component {method} in series. Any component {method} return err, it would return err directly.
Parameters:
Name Type Description
comps Array loaded component list
method String component lifecycle method name, such as: start, stop
cb function

static startByType()

Start servers by type.

static stopComps(comps, index, force, cb)

Stop components.
Parameters:
Name Type Description
comps Array component list
index Number current component index
force Boolean whether stop component immediately
cb function