}
else
{
- app.set('trust proxy', true); //http://dev.rdybarra.com/2016/06/23/Production-Logging-With-Morgan-In-Express/
+ // http://dev.rdybarra.com/2016/06/23/Production-Logging-With-Morgan-In-Express/
+ app.set('trust proxy', true);
// In prod, only log error responses (https://github.com/expressjs/morgan)
app.use(logger('combined', {
skip: function (req, res) { return res.statusCode < 400 }
}));
}
+// Allow layout.pug to select the right vue file:
+app.locals.development = app.get('env') === 'development';
+
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');