systemic-service-runner
v2.0.0
Published
Starts systemic systems
Downloads
6,643
Readme
Systemic Service Runner
Starts systemic systems
TL;DR
const Systemic = require('systemic');
const runner = require('systemic-service-runner');
const system = new Systemic().add('config', { foo: 1, bar: 2 }).add('app', require('./my-app')).dependsOn('config');
runner(system).start((err, components) => {
if (err) throw err;
console.log('Started');
});
Features
- Attempts to shutdown gracefully on error, unhandled rejection, SIGINT and SIGTERM events
- Attempts a graceful restart when
process
emits asystemic_restart
event
Usage
runner(<system>, [<options>]).start(<cb>)
Default options
{
logger: console,
restart: {
window: '60s'
}
}