Skip to content

💣 Microservice to report errors directly to your repo's GitHub Issues

Notifications You must be signed in to change notification settings

vadimdemedes/ohcrash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


OhCrash

Build Status

A microservice, which creates issues in a GitHub repository for each reported error. Think of it as barebones BugSnag, but errors are reported straight to GitHub Issues.

You can effortlessly deploy your own instance of OhCrash using now.

Deploy to now

Usage

OhCrash microservice requires a GitHub token, username and a repository name. You can obtain your personal access token here. Make sure to select public_repo scope to create issues in a public repository or repo for private repositories.

If you want to run OhCrash locally:

$ npm install --global ohcrash
$ export GITHUB_TOKEN="your token"
$ export GITHUB_USER="your username"
$ export GITHUB_REPO="target repository name"
$ ohcrash

ohcrash command accepts the same options as micro.

After OhCrash instance is up, use ohcrash-client module to start reporting errors! It catches uncaught exceptions and unhandled rejections out-of-the-box. Errors can also be reported manually, using a report() method.

const ohcrash = require('ohcrash-client').register('http://localhost:3000');

const err = new Error('Custom error handling');
ohcrash.report(err);

Learn more about the client at ohcrash-client repository.

Deployment

OhCrash can (and should 😄) be easily deployed to now by Zeit. Assuming you've got now all set up:

$ now -e GITHUB_TOKEN=token -e GITHUB_USER=user -e GITHUB_REPO=repo vadimdemedes/ohcrash

Alternatively, deploy ohcrash without even leaving the browser:

Deploy to now

Make sure to set a persistent alias using now alias for your deployment. Execute now help alias for information on how to do this. Later, use that URL as an endpoint for ohcrash-client.

require('ohcrash-client').register('https://my-ohcrash.now.sh');

License

MIT © Vadim Demedes

About

💣 Microservice to report errors directly to your repo's GitHub Issues

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published