use 'combined' logger in production

This commit is contained in:
2018-06-03 14:51:35 +03:00
parent 965491c9af
commit b33cc6fb13

4
app.js
View File

@@ -15,7 +15,9 @@ const app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(cors());
app.use(morgan('dev'));
process.env.NODE_ENV === 'production'
? app.use(morgan('combined'))
: app.use(morgan('dev'));
const passport = require('./config/passport');