1.0.13 • Published 10 years ago

@twilson63/palmetto-fire v1.0.13

Weekly downloads
-
License
ISC
Repository
github
Last release
10 years ago

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
1.0.13

10 years ago

1.0.12

10 years ago

1.0.10

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago