https://github.com/telexintegrations/telexpress
https://github.com/telexintegrations/telexpress
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/telexintegrations/telexpress
- Owner: telexintegrations
- Created: 2025-02-19T22:46:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-21T19:27:48.000Z (over 1 year ago)
- Last Synced: 2025-03-21T18:07:44.195Z (over 1 year ago)
- Language: TypeScript
- Size: 87.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telexpress
A lightweight Node.js error monitoring & logging package that sends uncaught exceptions and unhandled rejections to a [Telex](https://telex.im/) channel.
## Installation
```bash
npm install telexpress
```
## Usage
Check [here](https://docs.telex.im/docs/intro#webhooks-on-telex) for instructions on how to create a channel and get the webhook url for that channel.
## Example with Express
```bash
import express from 'express';
import { Logger } from 'telexpress';
const app = express();
const logger = new Logger(process.env.TELEX_CHANNEL_WEBHOOK_URL);
logger.initialize();
app.get('/', (req, res) => {
console.log('Hi')
});
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
new Promise((resolve, reject) => {
reject({message: 'this is an unhandled promise rejection'})
})
throw new Error('this is an uncaught exception')
```
### Uncaugh exception message

### Unhandled rejection message

## License
ISC License
## Author
Zeal Meruwoma