0.0.4 • Published 10 years ago

koa-random-sse v0.0.4

Weekly downloads
7
License
MIT
Repository
github
Last release
10 years ago

koa-random-sse

Sends random sse events, mainly for testing applications or modules like segmentio/sse.

Installation

$ npm install koa-random-sse

Example

var app = koa()
  .use(get('/', randomize(4)))

/**
 * Sents four random events in random intervals
 *
 * ->
 *   event: shout
 *   data: suggest
 *
 *   event: plan
 *   data: knowledge
 */

Test

$ make test

License

MIT