sam-silv / koa-face-errors

:smile: Errors with ASCII faces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

koa-face-errors

Errors with ASCII faces. Just because.

Based on cool-ascii-faces

Installation

npm install --save koa-face-errors

Usage

Require in your middleware stack somewhere near the top, it'll catch your Error and slip some fun in the mix.

Example

var app = require('koa'),
    faceHandler = require('koa-face-errors'),
    port = process.env.PORT || 3000

app.use(faceHandler())

app.use(function *(){
  this.throw(500, 'whoops')
})

app.listen(port)
console.log('Listening on port', port)

About

:smile: Errors with ASCII faces

License:MIT License


Languages

Language:JavaScript 100.0%