Skip to content
This repository has been archived by the owner on Feb 12, 2020. It is now read-only.

tosuke/gcf-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: {}
  }
) 

About

easy and powerful webhook 'middleware'

Resources

License

Stars

Watchers

Forks

Packages

No packages published