Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

koa-404-handler

ladjs5.6kMIT0.1.0

404 handler for Lad and Koa (best used with koa-better-error-handler)

lad, koa, 404, handler, error, middleware, ctx, koa-404-handler, lass

readme

koa-404-handler

build status code coverage code style styled with prettier made with lass license

404 handler for Lad and Koa (best used with koa-better-error-handler)

Table of Contents

Install

npm:

npm install koa-404-handler

yarn:

yarn add koa-404-handler

Usage

const errorHandler = require('koa-better-error-handler');
const koa404Handler = require('koa-404-handler');

// ...

// override koa's undocumented error handler
app.context.onerror = errorHandler;

// ... routes go here ...

app.use(koa404Handler);

app.listen();

Contributors

Name Website
Nick Baugh http://niftylettuce.com/

License

MIT © Nick Baugh

#