Removed 404 error handler and 404 page

This commit is contained in:
Sahat Yalkabov
2014-04-21 13:57:53 -04:00
3 changed files with 2 additions and 57 deletions

View File

@ -1121,7 +1121,7 @@ January 2014 and over a **120** issues and pull requests from **28** contributor
- New Instagram authentication that can be added via generator - New Instagram authentication that can be added via generator
- Forgot password and password reset for Local authentication - Forgot password and password reset for Local authentication
- Added LinkedIn authentication and API example - Added LinkedIn authentication and API example
- Added Stipe API example - Added Stripe API example
- Added Venmo API example - Added Venmo API example
- Added Clockwork SMS example - Added Clockwork SMS example
- Nicer Facebook API example - Nicer Facebook API example

11
app.js
View File

@ -194,18 +194,9 @@ app.get('/auth/venmo/callback', passport.authorize('venmo', { failureRedirect: '
res.redirect('/api/venmo'); res.redirect('/api/venmo');
}); });
/**
* 404 Error Handler
*/
app.use(function(req, res) {
res.status(404);
res.render('404');
});
/** /**
* 500 Error Handler. * 500 Error Handler.
* As of Express 4.0 it must be placed at the end of all routes.
*/ */
app.use(errorHandler()); app.use(errorHandler());

View File

@ -1,46 +0,0 @@
doctype html
html
head
title The page you were looking for doesn't exist (404)
style.
body {
background-color: #EFEFEF;
color: #2E2F30;
text-align: center;
font-family: arial, sans-serif;
}
div.dialog {
width: 25em;
margin: 4em auto 0 auto;
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #BBB;
border-top: #8CC84B solid 4px;
border-radius: 9px;
background-color: white;
padding: 7px 4em 0 4em;
}
h1 {
font-size: 100%;
color: #480;
line-height: 1.5em;
}
body > p {
width: 33em;
margin: 0 auto 1em;
padding: 1em 0;
background-color: #F7F7F7;
border: 1px solid #CCC;
border-right-color: #999;
border-bottom-color: #999;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-color: #DADADA;
color: #666;
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
}
body
.dialog
h1 404 Not Found
p The page you were looking for doesn't exist.