@moleculer/lab

0.6.4 • Public • Published

Moleculer Laboratory - Agent Service

NPM version Moleculer

Install

npm i @moleculer/lab --save

Usage

Laboratory Agent service

// lab.service.js
const Laboratory = require("@moleculer/lab");

module.exports = {
    mixins: [Laboratory.AgentService],
    settings: {
        token: "<something secret text>", // or set process.env.LAB_TOKEN
        apiKey: "<your API key>" // or set process.env.LAB_APIKEY
    }
};

The API key is sent to beta testers in e-mail.

Open the https://lab.moleculer.services and add a new project with the http://localhost:3210 URL and use the given (or generated) token.

Laboratory Metric Reporter

// moleculer.config.js
const Laboratory = require("@moleculer/lab");

module.exports = {
    // ...
    metrics: {
        enabled: true,
        reporter: "Laboratory"
    },        
    // ...
}

Laboratory Tracing Exporter

// moleculer.config.js
const Laboratory = require("@moleculer/lab");

module.exports = {
    // ...
    tracing: {
        enabled: true,
        exporter: "Laboratory"
    },       
    // ...
}

Laboratory Logger

// moleculer.config.js
const Laboratory = require("@moleculer/lab");

module.exports = {
    // ...
	logger: [{
		type: "Console",
		options: { /*...*/ }
	}, "Laboratory"],    
    // ...
}

Contact

Copyright (c) 2016-2021 MoleculerJS

@moleculerjs @MoleculerJS

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.6.4
    907
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.6.4
    907
  • 0.6.3
    0
  • 0.6.2
    95
  • 0.6.1
    4
  • 0.6.0
    177

Package Sidebar

Install

npm i @moleculer/lab

Weekly Downloads

1,183

Version

0.6.4

License

none

Unpacked Size

46.6 kB

Total Files

4

Last publish

Collaborators

  • icebob
  • shawnmcknight
  • andre.mazayev