How to use the express.errorHandler function in express

To help you get started, we’ve selected a few express examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marcells / bloggy / samples / expressjs / app.js View on Github external
var express = require('express');
var http = require('http');
var path = require('path');
var bloggy = require('../../lib/bloggy')
var app = express();

// Some expressjs stuff
app.set('port', process.env.PORT || 3000);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
app.use(express.urlencoded());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));
app.use(express.errorHandler());

// Create bloggy engine
var engine = bloggy();

// Configure bloggy engine
engine.extendWith(require('bloggy-query'));
engine.extendWith(require('bloggy-marked'));

engine.setup({
    baseDirectories: [path.join(__dirname, 'content')],
    entryUrl: 'http://localhost:' + app.get('port') + '/blog/{slug}'
});

app.get('/', function(req, res) {
    var entries = engine.entries.all.orderedByDate();
github NetEase / pomelo-admin-web / app.js View on Github external
app.configure('development', function() {
	app.use(express.static(pub));
	app.use(express.errorHandler({
		dumpExceptions: true,
		showStack: true
	}));
});
github mozilla / login.webmaker.org / app / http / server.js View on Github external
http.configure("development", function () {
    http.use(express.errorHandler());
  });
github sbstjn / node-kickstart / lib / kickstart.js View on Github external
kickstart.srv.configure('production', function(){
    kickstart.srv.use(express.errorHandler());
  });
github esnme / landscape / docs / app.js View on Github external
app.configure('production', function(){
  app.use(resmin.middleware(express, pubDir, resminConfig));
  var oneYear = 31557600000;
  app.use(express.static(pubDir, { maxAge: oneYear }));
  app.use(express.errorHandler()); 
});
github CodeForPhilly / lgbt-rights / app.js View on Github external
app.configure('development', function(){
  app.use(express.errorHandler());
});
github willerce / canku / app.js View on Github external
app.configure('development', function(){
  app.use(express.errorHandler());
});
github shijuvar / NodeExpressMongo / server.js View on Github external
app.configure('production', function(){
  app.use(express.errorHandler());
});
github thallium205 / BitcoinVisualizer / client / app.js View on Github external
app.configure('development', function(){
  app.use(express.errorHandler());
});