Skip to content

Adds request and response logging to lws verbose output

License

Notifications You must be signed in to change notification settings

lwsjs/request-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

view on npm npm module downloads Build Status Dependency Status Coverage Status js-standard-style

lws-request-monitor

Adds request and response logging to lws verbose output.

Example command:

$ lws --stack request-monitor static index --verbose

Example verbose output:

{
  'server.request': {
    requestId: 1,
    method: 'GET',
    url: '/package-lock',
    headers: {
      host: '192.168.0.200:8000',
      'user-agent': 'curl/7.65.0',
      accept: '*/*'
    }
  }
}
{
  'server.response': {
    requestId: 1,
    statusCode: 200,
    headers: [Object: null prototype] {
      'content-length': '27212',
      'last-modified': 'Wed, 05 Jun 2019 11:59:01 GMT',
      'cache-control': 'max-age=0',
      'content-type': 'application/json; charset=utf-8'
    },
    body: [ ReadStream: /Users/lloyd/Documents/lwsjs/examples/static-index/package-lock.json ]
  }
}

© 2017-20 Lloyd Brookes <[email protected]>.

About

Adds request and response logging to lws verbose output

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published