lws-request-monitor

2.0.0 • Public • Published

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 <75pound@gmail.com>.

Readme

Keywords

Package Sidebar

Install

npm i lws-request-monitor

Weekly Downloads

54,584

Version

2.0.0

License

MIT

Unpacked Size

5.82 kB

Total Files

4

Last publish

Collaborators

  • 75lb