using chalk and morgan together

Solutions on MaxInterview for using chalk and morgan together by the best coders in the world

showing results for - "using chalk and morgan together"
Lynn
16 Nov 2017
1var chalk = require('chalk')
2var morgan = require('morgan')
3
4app.use(morgan(function (tokens, req, res) {
5  return chalk.blue(tokens.method(req, res))
6    + ' ' + chalk.green(tokens.url(req, res))
7    + ' ' + chalk.red(tokens['response-time'](req, res))
8}))