systemic-service-runner
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

NPM version NPM downloads Node.js CI Maintainability Test Coverage Code Style systemic-service-runner Discover zUnit

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 a systemic_restart event

Usage

runner(<system>, [<options>]).start(<cb>)

Default options

{
    logger: console,
    restart: {
        window: '60s'
    }
}

Readme

Keywords

Package Sidebar

Install

npm i systemic-service-runner

Weekly Downloads

349

Version

2.0.0

License

ISC

Unpacked Size

11.8 kB

Total Files

18

Last publish

Collaborators

  • cressie176
  • ulisesgascon
  • feliun
  • guidesmiths_bot