Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    revpublic

    node-rev

    A (r)edis (ev)ent emitter for node.js.

    Installing

    Install with npm:

    npm install rev
    

    Usage

    var Emitter = require('rev').Emitter
    var emitter = new Emitter({ host : 'localhost', port : 6379, auth : 'xyz' })
     
    function firstSub () {
      emitter.emit('some:event', { json : 'able' }, 'arguments only')
    }
     
    emitter.on('some:event', function (data, str) { /* ... */ }, firstSub)
    emitter.pon('some:*', function (event, data, str) {
      // event is the matched event string 
      // data and str are the arguments passed 
    })

    Will work across multiple processes of course :) Uses redis pub/sub as the underlying transport.

    Keywords

    none

    install

    npm i rev

    Downloadslast 7 days

    99

    version

    0.0.1

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar