1.0.1 • Published 2 years ago

dbg-monitoring v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

dbg-monitoring-npm-package

Description

The dbg-monitoring-npm-package expect an URL and an object.

# parameter past into monitoring
# 1. url to monitoring service
# 2. obj with monitoring data

url : 'path to monitoring service',
{
    value_json: "object",
    value: "string",
    name: "string",
    source: "string",
    cast: "string",
}

CommonJS

const monitoring = require("dbg-monitoring");

monitoring('path to monitoring service',{
  value_json: "{'name':'value_json name', 'message':'this is a message passed into the value_json' }",
  value: "string value",
  name: "npm-package-test",
  source: "dbg-monitoring-npm-package",
  cast: "package",
}).then(function (result) {
  console.log(result);
});

es6

make sure you add "type": "module" to your package.json

import monitoring from "dbg-monitoring";

monitoring('path to monitoring service',{
  value_json: "{'name':'value_json name', 'message':'this is a message passed into the value_json' }",
  value: "string value",
  name: "npm-package-test",
  source: "dbg-monitoring-npm-package",
  cast: "package",
}).then(function (result) {
  console.log(result);
});

This package contains commonJS and es6 syntax.