Skip to content

softwares-compound/cadmium_express_sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cadmium Express SDK

The Cadmium Express SDK captures and sends unhandled exceptions in your Express applications to the Cadmium Cloud Service.

Features

  • Middleware integration for Express.
  • Captures uncaught exceptions and unhandled rejections.
  • Sends detailed error logs with context.

Installation

Install the dependencies:

npm install express axios dotenv

Usage

  1. Initialize the SDK in your project:

    const CadmiumSDK = require('./cadmium-sdk');
    const cadmium = new CadmiumSDK({
        applicationId: 'your-app-id',
        secret: 'your-cd-secret',
        id: 'your-cd-id'
    });
  2. Use the middleware in your Express app:

    app.use(cadmium.middleware());
  3. Enable global exception handling:

    cadmium.handleUncaughtExceptions();
  4. Example Express App: Run the example app with:

    node example.js

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published