JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19004
  • Score
    100M100P100Q137795F
  • License BSD-3-Clause

Server and process monitoring plugin

Package Exports

  • @hapi/good

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@hapi/good) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

good

hapi process monitoring

Build Status

good is a hapi plugin to monitor and report on a variety of hapi server events as well as ops information from the host machine. It listens for events emitted by hapi server instances and pushes standardized events to a collection of streams.

Example Usage

const Hapi = require('@hapi/hapi');

const server = Hapi.server();

const options = {
    ops: {
        interval: 1000
    },
    reporters: {
        myConsoleReporter: [
            {
                module: 'good-squeeze',
                name: 'Squeeze',
                args: [{ log: '*', response: '*' }]
            },
            {
                module: 'good-console'
            },
            'stdout'
        ]
    }
};

await server.register({
    plugin: require('good'),
    options,
});

await server.start();

console.info(`Server started at ${ server.info.uri }`);

See the Reporter Interface section of the API documentation on how to configure reporters.

Looking for more examples? Check out the examples folder.

Existing streams

The following streams are maintained by the hapi community and are known to work with good. Any transform or write stream can work with good, these are just a few inside the hapijs organization.

API

See the API Reference.