Logging
The Express server, ./lib/express/index.js
, uses the logger
middleware for logging. The Express logger should only be used in development. In fact, in a production environment, this will seriously impact performance as console functions are synchronous. Let's change the Express server and switch off logging when in production, as shown in the following code snippet:
if (process.env['NODE_ENV'] !== "production") app.use(express.logger({ immediate: true, format: 'dev' }));