Skip to content

brer/brer-nodejs

Repository files navigation

Official Node.js runtime for Brer

npm JavaScript Style Guide

import brer from 'brer'

async function myTask (payload, ctx) {
  console.log('Function name: ' + ctx.invocation.functionName)
  console.log('Invocation id: ' + ctx.invocation._id)

  console.log('Payload type: ' + ctx.contentType)
  // do something useful with the payload (Buffer)

  return 42
}

// Run
brer(myTask)

Debug

Set the NODE_DEBUG to brer to print all internal log messages.