Registry / web-framework / web

web

JSON →
library0.0.2jsnpmunverified

The `web` package, also known as `node-web` and authored by `creationix`, is an extremely early-stage (v0.0.2) web/HTTP library for Node.js, last published over a decade ago in January 2013. It was conceived as a lightweight and fast alternative intended to entirely replace Node.js's built-in `http` module and offer a more streamlined approach to web application development than contemporary middleware systems like `connect` or `stack`. Its design was heavily influenced by interface patterns found in `wsgi`, `rack`, `jsgi`, and `strata.js`, emphasizing simple module composition where any function implementing a `(request, respond)` or `(req, res, next)` interface could serve as a valid web application layer. Given its very low version number and the lack of updates for over a decade, this project is considered abandoned and is highly unlikely to be compatible with modern Node.js runtimes or best practices, including native ESM support. Its historical significance lies in exploring alternative HTTP server paradigms during Node.js's formative years.

web-frameworkhttp-networking
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This package is CommonJS only and does not support ES modules. Attempting to use `import` will result in an error in modern Node.js environments.

const web = require('web')

The primary API is accessed via the `web` object directly; destructuring is not typical for this CommonJS pattern in this library's context.

const server = web.createServer(...)

Demonstrates creating a basic HTTP server that responds to the root path and passes other requests to the next middleware.

const web = require('web'); const app = web.createServer(function (req, res, next) { if (req.url === '/') { res.end('Hello World\n'); } else { next(); // Pass control to the next layer } }); // The server object allows for starting and stopping the HTTP listener. // In a real application, you might add more complex routing or middleware before app.listen. app.listen(8080, () => { console.log('Web server listening on http://localhost:8080/'); // To stop the server for testing purposes or graceful shutdown: // setTimeout(() => { // server.close(() => console.log('Server stopped.')); // }, 5000); });
Debug
Known footguns
breakingThe package is extremely old (v0.0.2, last updated Jan 2013) and relies on outdated Node.js APIs and patterns. It is highly unlikely to be compatible with modern Node.js versions (e.g., Node.js 14+).
gotchaThis library attempts to *replace* the built-in Node.js `http` module. This design choice is fundamentally incompatible with most contemporary Node.js web development, which typically builds upon or coexists with the `http` module, not substitutes it entirely.
deprecatedThe project is abandoned, with no updates or maintenance for over a decade. It does not support modern JavaScript features, ES Modules (ESM), or current security best practices.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
15 hits · last 30 days
gptbot
4
ahrefsbot
4
amazonbot
4
script
1
bingbot
1
mj12bot
1
Resources