Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 21, 2024 via pnpm

morgan 1.6.1

HTTP request logger middleware for node.js
Package summary
Share
6
issues
3
critical severity
vulnerability
2
license
1
1
high severity
vulnerability
1
1
moderate severity
vulnerability
1
1
low severity
vulnerability
1
2
licenses
7
MIT
1
N/A
Package created
8 Feb 2014
Version published
4 Jul 2015
Maintainers
1
Total deps
8
Direct deps
5
License
MIT

Issues

6

3 critical severity issues

critical
Recommendation: Upgrade to version 1.9.1 or later
via: morgan@1.6.1
Recommendation: Upgrade to version 1.9.1 or later
via: morgan@1.6.1
Recommendation: Check the package code and files for license information
via: debug@2.2.0
Collapse
Expand

1 high severity issue

high
Recommendation: Upgrade to version 2.6.9 or later
via: debug@2.2.0
Collapse
Expand

1 low severity issue

low
Recommendation: Upgrade to version 2.6.9 or later
via: debug@2.2.0
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
basic-auth@1.0.4
debug@2.2.0
depd@1.0.1
ee-first@1.1.1
morgan@1.6.1
on-finished@2.3.0
on-headers@1.0.2

N/A

N/A
1 Packages, Including:
ms@0.7.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of morgan 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
basic-auth1.0.42.93 kBMIT
prod
debug2.2.010.05 kBMIT
prod
1
1
1
1
depd1.0.18.33 kBMIT
prod
on-finished2.3.04.45 kBMIT
prod
on-headers1.0.23.15 kBMIT
prod

Visualizations

Frequently Asked Questions

What does morgan do?

Morgan is a powerful HTTP request logger middleware for Node.js applications. It helps you monitor and analyze your app's incoming HTTP requests in real time. Morgan is exceptionally useful for debugging during development or even monitoring traffic patterns on production servers.

How do you use morgan?

Morgan is easy to use within your Node.js application. Simply install it using npm:

npm install morgan

Then, require and use it inside your application file like so:

var express = require('express')
var morgan = require('morgan')

var app = express()

app.use(morgan('combined'))

app.get('/', function (req, res) {
  res.send('hello, world!')
})

In this case, 'combined' is one of the predefined formats that Morgan offers. This will log requests in the Apache combined format. If you want to log using a custom format, you could use something like this:

app.use(morgan(':method :url :status :res[content-length] - :response-time ms'))

Morgan can also be used to log to a specific file stream:

var fs = require('fs')
var path = require('path')

var accessLogStream = fs.createWriteStream(path.join(__dirname, 'access.log'), { flags: 'a' })

app.use(morgan('combined', { stream: accessLogStream }))

Where are the morgan docs?

Morgan's documentation, including more detail about formats, options, and custom tokens, can be found in the README file of its GitHub repository at https://github.com/expressjs/morgan. By consulting the official documentation, you can learn how to make the most of the tool and integrate it effectively into your Node.js applications.