Express/Connect middleware for pushing exceptions to the snitch.io api

npm install tattle
4 downloads in the last week
5 downloads in the last month

Tattle: Express/Connect middleware for use with snitch.io

Use this middleware to send any un-handled exceptions from your Connect/Express (Node.js) applications to snitch.io.

Get it from NPM

npm install tattle

Configuring the middleware

Be sure to place the app.use(tattle(...)) line after app.use(app.router).

var tattle = require('tattle');

var tattleMailerOptions = {
    service: "Gmail"
    ,auth: {
        user: 'you@gmail.com'
        ,pass: 'your-gmail-password'
    ,from: 'you@gmail.com'
    ,to: 'you@gmail.com'

app.use(tattle('your-api-key', tattleMAilerOptions, 'Your Application Name', 'Environment String'));

If for some reason the snitch.io api is down, you'll be emailed an exception report instead. If email fails, the only output will be to console.error(), otherwise it will fail silently.

tattleMailerOptions is a superset of NodeMailer Transport Options. It's essentially a NodeMailer Transport Options object with from and to keys added at the root level. You should be able to use any transport service configuration that NodeMailer supports.

The Environment String is optional and defaults to process.env.NODE_ENV.


Pull requests, issues, and feedback welcome!

npm loves you