From b49b28beeffad1490b3ee7585a9e8e99cd2adc9f Mon Sep 17 00:00:00 2001 From: xcps Date: Wed, 15 Aug 2018 20:44:56 +0500 Subject: [PATCH] Turn off logging for production mode --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 64e350f..098c3ca 100644 --- a/app.js +++ b/app.js @@ -20,7 +20,9 @@ app.set('view engine', 'pug'); // uncomment after placing your favicon in /public app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); -app.use(logger('dev')); +if (env === 'development') { + app.use(logger('dev')); +} app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser());