Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how can prevent morgan to work in test enviroment

const logger = require('morgan');
const app = express();
app.use(logger('dev', { skip: (req, res) => process.env.NODE_ENV === 'test' }));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #prevent #morgan #work #test #enviroment
ADD COMMENT
Topic
Name
4+3 =