https://github.com/softwares-compound/cadmium_express_sdk
https://github.com/softwares-compound/cadmium_express_sdk
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/softwares-compound/cadmium_express_sdk
- Owner: softwares-compound
- Created: 2024-12-10T05:14:21.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-10T05:28:10.000Z (6 months ago)
- Last Synced: 2025-03-28T02:01:46.960Z (about 2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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:
```bash
npm install express axios dotenv
```## Usage
1. Initialize the SDK in your project:
```javascript
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:
```javascript
app.use(cadmium.middleware());
```3. Enable global exception handling:
```javascript
cadmium.handleUncaughtExceptions();
```4. Example Express App:
Run the example app with:
```bash
node example.js
```## License
MIT