Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@exceptionless/node

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exceptionless/node

JavaScript client for Exceptionless

  • 2.0.0-alpha1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Exceptionless NodeJS

Using Exceptionless in the NodeJS environment is similar to using it in other JavaScript environments.

Installation

Using npm:

npm i @exceptionless/node

Using yarn:

yarn add @exceptionless/node

Configuration

When your NodeJS app starts up, it should tell the Exceptionless client to startup like this:

await Exceptionless.startup(c => {
  c.apiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw";
  c.serverUrl = "http://localhost:5000";
  c.useDebugLogger();

  c.defaultTags.push("Example", "Node");

  // set some default data
  c.defaultData["SampleUser"] = {
    id: 1,
    name: "Blake",
    password: "123456",
    passwordResetToken: "a reset token",
    myPasswordValue: "123456",
    myPassword: "123456",
    customValue: "Password",
    value: {
      Password: "123456"
    }
  };
});

Once that's done, you can use the Exceptionless client anywhere in your app by calling Exceptionless followed by the method you want to use. For example:

Exceptionless.submitLog("Hello, world");

Using With Express

When using this package with an Express server, you should call exceptionless.startup() when the server starts. There are many ways to do this, but it's important that the client is instantiated before the server is used.

Keywords

FAQs

Package last updated on 09 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc