node-res is a lightweight Node.js module designed to simplify the creation of HTTP responses by providing a facade over the native `http.ServerResponse` object. It offers utility methods to easily set common HTTP headers, define response statuses, and automatically determine appropriate `Content-Type` headers based on the body content. As of its latest stable version `5.0.1`, published over seven years ago in August 2018, the library appears to be in a maintenance-only state with no active development or regular release cadence. Its key differentiator is its minimal footprint and focus on direct manipulation of the response object without introducing significant abstraction layers, offering helpers for common tasks like sending HTML, JSON, or JSONP, and handling ETags. It is primarily built for CommonJS environments.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
The library primarily exports a single object for CommonJS. While some transpilers might handle `import nodeRes from 'node-res'`, it's not a native ESM export.
Methods like `send` are properties of the default exported `nodeRes` object, not named exports.
Similar to `send`, `jsonp` is a method accessed via the `nodeRes` object.
Demonstrates how to set up a basic Node.js HTTP server and use `node-res` to send different types of responses (HTML, JSON, custom status messages, and JSONP) with automatic content-type handling.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.