nomi-error

error handler middleware for nomi.js

Usage no npm install needed!

<script type="module">
  import nomiError from 'https://cdn.skypack.dev/nomi-error';
</script>

README

nomi-error

the error middleware for nomi framework.

Installation

$ npm install nomi-error --save

Node.js >= 8.0.0 required.

Usage


const error = require('nomi-error');
const Koa = require('koa');
const app = new Koa();
const options = {
  accepts: ['html', 'text', 'json']
}
app.use(error('html', 'text', 'json'));