Nylon Pendulum Movement

    pubsweet-sse

    1.0.55 • Public • Published

    pubsweet-sse

    Broadcast server-sent events to connected Express clients.

    Install

    npm install pubsweet-sse
    

    or

    yarn install pubsweet-sse
    

    Example usage in Express

    const sse = require('pubsweet-sse')
    
    // set the /updates route for authenticated clients to connect using EventSource
    app.get('/updates', passport.authenticate('bearer'), sse.connect)
    
    // broadcast data to all connected clients
    sse.send({ foo: 'bar' })

    Alternatives

    This module was originally adapted from express-sse

    Keywords

    none

    Install

    npm i pubsweet-sse

    DownloadsWeekly Downloads

    497

    Version

    1.0.55

    License

    MIT

    Unpacked Size

    16.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • jure
    • yannisbarlas
    • andrei.c9
    • shockandaudrey