Class: Daemon

arpen/app/daemon~ Daemon

Runs the servers

new Daemon(basepath, pidFile [, options])

Create daemon
Parameters:
Name Type Argument Description
basepath string Base directory of the project
pidFile string PID file absolute path and name
options object <optional>
Options
Properties
Name Type Argument Default Description
restartPause number <optional>
1000 Pause between restarting crashed app, ms
maxBufferLength number <optional>
10000 Lines of buffer of crashed app output

Members


runner :Runner

Runner service getter
Type:
  • Runner

emailer :Emailer

Emailer service getter
Type:
  • Emailer

name :string

Full name of the application
Type:
  • string

Methods


getConfig(key)

Lookup configuration key
Parameters:
Name Type Description
key string Key separated by dots
Returns:
Type
*

<async> run(servers)

Run the app
Parameters:
Name Type Description
servers Array.<string> Server names
Returns:
Type
Promise

<async> _restart(servers)

Restart the app
Parameters:
Name Type Description
servers Array.<string> Server names
Returns:
Type
Promise

_exit( [rc])

Terminate the process
Parameters:
Name Type Argument Description
rc number <optional>
Exit code