@bitaffair/turtle
v1.1.0
Published
Supervisor for lifting modular and testable applications.
Readme
@bitaffair/turtle
Supervisor for lifting modular and testable applications.
Install
npm install --save @bitaffair/turtle
Docs
Turtle
Options
.provide(name, async factory)
Provide a service.
.wire(desc, async handler)
Register a wire handler to wire up some things
.use(plugin[, options])
Register a plugin receiving turtle instance an given options.
.boot()
Start all services and wire them up returning a cradle to access them. Mostly used during tests if gracefull shutdown etc. is not needed.
.run()
Autorun application with bootup logs and graceful shutdown handling.
Environment variables
- LOG_LEVEL --> see pino loglevels
- LOG_FORMAT [json]
$app
.shutdown(options)
Graceful shutdown of application.
options
.forceBoolean (default: false) Will call process.exit(1) after all..reasonString (default: null) Shutdown reason for logging
