gcf-webhook

1.0.0 • Public • Published

gcf-webhook

easy and powerful webhook 'middleware'

Example

const webhook = require("gcf-webhook");
 
// Google Cloud Function(HTTP trigger) entry point
exports.entry = webhook(
  body => {
    return {
      text: body.message
    }
  },
  "https://webhook.example.com",
  // common fields
  {
    channel: "#general"
  },
  // axios options(see https://github.com/axios/axios#request-config)
  {
    headers: {}
  }
) 

Readme

Keywords

none

Package Sidebar

Install

npm i gcf-webhook

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tosuke