cadmium-express-sdk
v1.0.0
Published
A middleware for Express to capture unhandled exceptions and send them to Cadmium Cloud Service.
Maintainers
Readme
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 dotenvUsage
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' });Use the middleware in your Express app:
app.use(cadmium.middleware());Enable global exception handling:
cadmium.handleUncaughtExceptions();Example Express App: Run the example app with:
node example.js
License
MIT
