2.0.4 • Published 9 years ago

express-page-error-middleware v2.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

express-page-error-middleware

npm version Build Status codecov.io

Error pages handling middleware for express

Install

$ npm install --save express-page-error-middleware

Usage

Below is a example of usage. test/fixture/app.js also have a similar example.

var express = require('express');
var errorMiddleware = require('express-page-error-middleware');

var app = express();

// define your routes

// this will add a 404 error if the request is not handled before and render an error page
app.use(errorMiddleware('./templates/error.jade'));

Template

Variables provided inside the template.

  • code status code
  • detail message
  • error error object
  • stack error stack
  • url bind this e.g. while throwing an API error object err.url = apiRequest.url, to see what API url has caused it
2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago