Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
volleyball
Advanced tools
🏐 Tiny HTTP logger for Express showing asynchronous requests and responses
const app = require('express')()
const volleyball = require('volleyball')
app.use(volleyball)
Volleyball is a minimal Connect-style middleware function which logs incoming requests and outgoing responses as separate events. It optionally supports the debug
module.
Logging HTTP cycles can be approached in several ways, each with its own drawbacks:
Volleyball takes the last approach, and assigns randomly-generated ids to label request-response pairs. It is designed for student project development, teaching beginning programmers how HTTP servers and asynchronicity work. It may also be useful as a low-configuration debug tool.
volleyball
The volleyball
module can be used directly as demonstrated in the first example. The module defaults to using process.stdout
for output.
volleyball.custom(config)
A customized logging middleware can be generated by calling custom
with a configuration object:
const logger = volleyball.custom({ debug: true }) // default namespace 'http'
// const logger = volleyball.custom({ debug: 'custom-namespace' })
// const logger = volleyball.custom({ debug: debugInstance })
app.use(logger)
The debug
property logs using the debug
module. It supports the following values:
value | result |
---|---|
true | uses a new debug instance with a default namespace of 'http' |
string | uses a new debug instance with a custom namespace |
function | uses any function, such as a pre-generated debug instance. Note that the function will be called with colorized strings. |
For more powerful, configurable, and compatible logging needs, check out:
FAQs
🏐 Tiny HTTP logger for Express showing asynchronous requests and responses
The npm package volleyball receives a total of 233 weekly downloads. As such, volleyball popularity was classified as not popular.
We found that volleyball demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.