feathers-monitor

0.0.12 • Public • Published

Installation

Using npm:

$ npm i --save feathers-monitor

Registering Plugins

const Feathers   = require('@feathersjs/feathers');
const Express    = require('@feathersjs/express');
const Monitor, { monitorHook, before, after, error }    = require('feathers-monitor');
 
const app = Express(Feathers())
app.configure(SocketIO())
    .configure(Monitor({
        channel: 'MONITOR' // channel that receive server usage,
        logging: () => {
            // logging function to log monitor data.
        }
    }));
 
app.hooks({ before, after, error }); // App level hook should be run first & last
app.hooks({
    before: monitorHook(
        'before-test',
        (context) => {
            console.info('this hooks have been performance would be recorded');
        }
    ),
});

/feathers-monitor/

    Package Sidebar

    Install

    npm i feathers-monitor

    Weekly Downloads

    13

    Version

    0.0.12

    License

    ISC

    Unpacked Size

    5.31 kB

    Total Files

    4

    Last publish

    Collaborators

    • oskang