@twilson63/palmetto-fire

1.0.13 • Public • Published

Palmetto Fire

Palmetto Fire is a module that uses firebase as a commit-log system to support microservices, the palmetto module works for both the server and the browser

Build Status

Usage

var palmetto = require('@twilson63/palmetto-fire')

var ee = palmetto({
  endpoint: 'https://firebase.io/foobar',
  token: '...firebase secret...'
  app: '...'
})

// publish event object

ee.emit('send', {
  to: 'widget/create',
  from: '...',
  subject: 'widget',
  verb: 'create',
  object: {

  }
})

// subscribe event object
ee.on('widget/create', function(event) {
  // do stuff
  var responseEvent = {
    to: event.from,
    object: {

    }
  }
  ee.emit('send', responseEvent)
})

Install

npm i @twilson63/palmetto-fire

Test

npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.13
    1
    • latest

Version History

Package Sidebar

Install

npm i @twilson63/palmetto-fire

Weekly Downloads

1

Version

1.0.13

License

ISC

Last publish

Collaborators

  • twilson63