New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ajl-express-error-middleware

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ajl-express-error-middleware - npm Package Compare versions

Comparing version

to
1.0.1

13

index.js

@@ -1,3 +0,10 @@

module.exports = function() {
return function(err, req, res, next) {
module.exports = function(app) {
// catch 404 and forward to error handler
app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});
app.use(function(err, req, res, next) {
var locals = {

@@ -17,3 +24,3 @@ message: err.message,

res.render('error', locals);
};
});
};
{
"name": "ajl-express-error-middleware",
"version": "1.0.0",
"description": "Error handling middleware for a NodeJS Express app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/aliatsis/ajl-express-error-middleware.git"
},
"author": "Anthony Liatsis <anthony.liatsis@gmail.com>",
"license": "-",
"bugs": {
"url": "https://github.com/aliatsis/ajl-express-error-middleware/issues"
},
"homepage": "https://github.com/aliatsis/ajl-express-error-middleware"
}
"name": "ajl-express-error-middleware",
"version": "1.0.1",
"description": "Error handling middleware for a NodeJS Express app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/aliatsis/ajl-express-error-middleware.git"
},
"author": "Anthony Liatsis <anthony.liatsis@gmail.com>",
"license": "-",
"bugs": {
"url": "https://github.com/aliatsis/ajl-express-error-middleware/issues"
},
"homepage": "https://github.com/aliatsis/ajl-express-error-middleware"
}