@speedup/sysinfo-health
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

SpeedUP Health service

This module provides some information about your service health.

NPM version NPM downloads

Installation

# NPM
npm i @speedup/sysinfo-health --save

# Yarn
yarn install @speedup/sysinfo-health

Parts

This module consists of 3 main parts.

  1. HealthService (which is responsible for retrieving health information from the requested providers).
  2. InfoProvider (which is responsible for providing health information)
  3. WebFramework (which is responsible for integrating with the web frameworks).

Usage

const serviceHealth = require('@speedup/sysinfo-health');

const infoProvider = new serviceHealth.InfoProvider({
    loadDefaultProviders: true
});

const healthProvider = new serviceHealth.HealthProvider(config, infoProvider);

// inside your async function, try
const health = await healthProvider.retrieve();

// returns an object that contains the health information


// you can return only the information about specific parts of the hardware/software
// by providing the list of modules
// built-in info services: CPU, memory, OS, path, uptime, user
const health = await healthProvider.retrieve(['CPU', 'memoy']);

And you're good to go!

License

MIT

Package Sidebar

Install

npm i @speedup/sysinfo-health

Weekly Downloads

0

Version

1.0.7

License

none

Unpacked Size

45.7 kB

Total Files

40

Last publish

Collaborators

  • dmanavi