Reducing the double env === development
This commit is contained in:
parent
44ad65a5b0
commit
fa0fd2b07f
1 changed files with 1 additions and 3 deletions
4
app.js
4
app.js
|
@ -50,9 +50,6 @@ app.use(session({
|
|||
|
||||
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
if (app.get('env') === 'development') {
|
||||
app.locals.pretty = true;
|
||||
}
|
||||
|
||||
// Setup authentication via twitter.
|
||||
passport.use(new Strategy(
|
||||
|
@ -148,6 +145,7 @@ app.use(function(req, res, next) {
|
|||
// development error handler
|
||||
// will print stacktrace
|
||||
if (app.get('env') === 'development') {
|
||||
app.locals.pretty = true;
|
||||
app.use(function(err, req, res, next) {
|
||||
res.status(err.status || 500);
|
||||
res.render('admin-error', {
|
||||
|
|
Loading…
Reference in a new issue