# connect-sse

> connect middleware for server sent events (EventSource)

Latest version **1.2.0** (published 2015-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install connect-sse
pnpm add connect-sse
yarn add connect-sse
bun add connect-sse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2015-05-08 |
| First published | 2012-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | Andrew Kelley |
| Maintainers | superjoe |
| Keywords | connect, sse, middleware, eventsource, event, source, server, sent, events |

## Links

- npm: https://www.npmjs.com/package/connect-sse
- Repository: https://github.com/andrewrk/connect-sse
- Issues: https://github.com/andrewrk/connect-sse/issues
- npm.io page: https://npm.io/package/connect-sse

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2015-05-08
- 1.1.0 — 2015-02-07
- 1.0.6 — 2014-09-08
- 1.0.5 — 2013-03-12
- 1.0.4 — 2012-12-31
- 1.0.3 — 2012-12-30
- 1.0.2 — 2012-12-30
- 1.0.1 — 2012-10-12
- 1.0.0 — 2012-10-11

## README

[![Build Status](https://secure.travis-ci.org/andrewrk/connect-sse.png)](http://travis-ci.org/andrewrk/connect-sse)

Usage:
------

```js
var sse = require('connect-sse')();
var express = require('express')

var app = express()
app.get('/events', sse, function (req, res) {
  res.json("this is an event");
  res.json({here: "is", another: "event"});
  res.json({here: "is a named event", to: "listen with addEventListener('example', function(){})"}, "example");
});
```

---
_Source: https://npm.io/package/connect-sse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
