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')));
|
app.use(express.static(path.join(__dirname, 'public')));
|
||||||
if (app.get('env') === 'development') {
|
|
||||||
app.locals.pretty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup authentication via twitter.
|
// Setup authentication via twitter.
|
||||||
passport.use(new Strategy(
|
passport.use(new Strategy(
|
||||||
|
@ -148,6 +145,7 @@ app.use(function(req, res, next) {
|
||||||
// development error handler
|
// development error handler
|
||||||
// will print stacktrace
|
// will print stacktrace
|
||||||
if (app.get('env') === 'development') {
|
if (app.get('env') === 'development') {
|
||||||
|
app.locals.pretty = true;
|
||||||
app.use(function(err, req, res, next) {
|
app.use(function(err, req, res, next) {
|
||||||
res.status(err.status || 500);
|
res.status(err.status || 500);
|
||||||
res.render('admin-error', {
|
res.render('admin-error', {
|
||||||
|
|
Loading…
Reference in a new issue