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

0.9.4 • Public • Published

Service Init

Wraps the initialization tasks of a backend service.

Features

  • A bunyan logger
  • MQTT client connection via mqtt-topping
  • A config query method which
  • Bootstrap parameter returned by a query of a given uri with retries

Usage

var init = require("service-init");

var serviceId = "myService";
var bootstrapUri = "http://bootstrap-server.com/myService"; // process.env is used for bootstrapping if null

init(serviceId, bootstrapUri, (log, mqttClient, queryConfig, bootstrapData) => {
  // application logic goes here
});

Readme

Keywords

none

Package Sidebar

Install

npm i service-init

Weekly Downloads

1

Version

0.9.4

License

MIT

Unpacked Size

7.61 kB

Total Files

5

Last publish

Collaborators

  • d-lin
  • j-era
  • becks-artcom
  • utileetdulce