
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
minimalist http server wrapper
npm install wob
var fs = require('fs')
, Browserify = require('browserify')
, Stylus = require('stylus-fs')
wob.createServer(function(req) {
if (req.url === '/index.js')
return Browserify(__dirname + req.url)
if (req.url === '/index.css')
return Stylus(__dirname + req.url.replace(/\.css$/, '.styl'))
if (req.url === '/index.html')
return fs.createReadStream(__dirname + req.url)
throw wob.status[404]
})
wob.createServer(function(req) {
return stream.on('piped', function(res) {
res.setHeader('Content-Type', 'x-weird/weirdness')
})
})
Wrap a wob request handler so you can feed it to http.createServer
A promise will be resolved.
A Stream will be piped to the response stream (return stream is pretty much equivalent to doing stream.pipe(res) in core-http)
Any other value will be serialised to JSON and sent as response.
Thrown errors are also serialised to JSON. If they have a .statusCode property, that'll be set as status code.
Shorthand for http.createServer(wob(fn))
Stream | Value | Promise<Response>
MIT
FAQs
minimalist http server wrapper
We found that wob 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.