The `sse` package (einaros/sse.js) provides a server-side implementation of the HTML5 Server-Sent Events (SSE) specification for Node.js applications. SSE enables a server to push data to web pages over HTTP, facilitating real-time communication without the overhead of WebSockets for unidirectional data flows. Currently at version `0.0.8`, this package is considered abandoned, with its last release dating back approximately eight years (published December 2017, but copyright 2011) and minimal activity on its GitHub repository. Its primary differentiator was offering a straightforward, low-level API to integrate SSE directly with Node.js's native HTTP server, abstracting the complexities of managing event streams and client connections. Given its age, it relies exclusively on CommonJS and is likely incompatible with modern Node.js versions and ES module adoption. Users seeking SSE functionality in current Node.js environments should consider actively maintained alternatives such as `@fastify/sse`, `sse-channel`, or `better-sse` due to potential compatibility, security, and feature limitations.
npm install sseVerified import paths — ran on the pinned version, not inferred.
Sets up a basic Node.js HTTP server that integrates `sse.js` to handle Server-Sent Events. It sends an initial message upon client connection and then broadcasts periodic updates every three seconds, demonstrating unidirectional server-to-client communication.
Avoid using this package in new projects. For existing projects, consider migrating to actively maintained SSE libraries compatible with modern Node.js, such as `@fastify/sse`, `sse-channel`, or `better-sse`.
Do not use this package in production environments. Migrate to a well-maintained and actively developed SSE solution that addresses modern security standards.
Ensure `require('sse')` is used in CommonJS contexts. For projects using ES modules, a wrapper might be necessary, but migration to a modern, ESM-compatible SSE library is strongly recommended.Run `npm install sse` to ensure the package is available. If using ES modules, rewrite your import to `const SSE = require('sse');` in a CommonJS-compatible file, or switch to a modern SSE library with ESM support.Verify that `http.createServer` correctly returns a server instance and that the server is properly listening before passing it to `new SSE(server)`. Given the package's age, fundamental incompatibilities with modern Node.js `http` module APIs are likely; consider migrating to an alternative SSE library.
No dependency data recorded yet.