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
|
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