service-skeleton
v0.0.8
Published
The 'service-skeleton' gives any Node service some basic functionalities such as: logging, metrics and probing
Downloads
12
Maintainers
Readme
service-skeleton
The 'service-skeleton' gives any Node service some basic functionalities such as: logging, metrics and probing.
This package wraps following projects:
Take a look to the TODO if you want to help towards the next steps.
Installation
Node Dependencies
Add following line to your project dependencies
"service-skeleton": "0.0.x",
then hit
npm install
Require module
var options = {
loggerjs: {
logLevel: 'INFO',
logfileDirectory : 'path_to_dir'
/*... something ...*/
},
metrics: {
disable_cpu_metrics: false
/*... something ...*/
},
},
skeleton = require('service-skeleton')(options);
// Log service start
skeleton.logger.info('"'+skeleton.probe.name+'" service starting...');
The options object holds option groups for the wrapped packages
####List of available options
Usage
skeleton.logger
Singleton returned by the package loggerjs.
skeleton.metrics
Singleton returned by the package service-metrics.
skeleton.probe
JSON object generated by the service-probe package.