arc.events.subscribe

Subscribe functions to events

An example of a hit-counter event handler:

var arc = require('@architect/functions')

function count(payload, callback) {
  console.log(JSON.stringify(payload, null, 2))
  // maybe save count to the db here
  callback()
}

exports.handler = arc.events.subscribe(count)