diff options
Diffstat (limited to 'src/app.js')
-rw-r--r-- | src/app.js | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -12,7 +12,7 @@ app.set('views', path.join(__dirname, '../views')); app.set('view engine', 'pug'); app.use(logger('dev', { - skip: () => app.get('env') === 'test' + skip: () => app.get('env') === 'test' })); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended: false})); @@ -23,18 +23,18 @@ app.use('/', routes); // Catch 404 and forward to error handler app.use((req, res, next) => { - const err = new Error('Not Found'); - err.status = 404; - next(err); + const err = new Error('Not Found'); + err.status = 404; + next(err); }); // Error handler app.use((err, req, res, next) => { // eslint-disable-line no-unused-vars - res - .status(err.status || 500) - .render('error', { - message: err.message - }); + res + .status(err.status || 500) + .render('error', { + message: err.message + }); }); export default app; |