{"repo":"roccomuso/node-webhooks","free":true,"listed":false,"github":"https://github.com/roccomuso/node-webhooks","clone":"git clone https://github.com/roccomuso/node-webhooks.git","description":":arrow_right_hook: Node.js module to create and trigger your own webHooks.","language":"JavaScript","stars":191,"topics":["node-webhooks","trigger","node","javascript","npm","module","webhooks","nodejs"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"node-webhooks What webhooks are used for Webhooks are \"user-defined HTTP callbacks\". They are usually triggered by an event, such as pushing code to a repository or posting a comment to a blog. When that event occurs, the source site makes an HTTP request to the URI configured for the webhook. Users can configure webhooks to cause events on one site to invoke behavior on another. Common uses include triggering builds with continuous integration systems or notifying bug tracking systems. Since webhooks use HTTP, they can be integrated into web services without adding new infrastructure. Install npm install node-webhooks --save or: yarn add node-webhooks Supports Node.js 18 or later. How it works When a webhook is triggered, it sends a POST request to each attached URL. The request body contains the JSON-serialized payload passed to the trigger method. Debug This module uses the popular debug package. Set the environment variable to enable debug output: DEBUG=node-webhooks . To launch the example with debug output enabled, run: DEBUG=node-webhooks node example.js Usage Available events The module uses an event emitter to expose request information when a webhook is triggered. This makes it possible to check whether a webhook trigger succeeded and to inspect request information such as the status code or response body. Events use the format eventName.result . The selected library, eventemitter2 , provides a flexible way to listen for events. For example: - eventName.success - ev","default_branch":null,"files":null,"tree":[],"storefront":"/r/roccomuso","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/roccomuso/node-webhooks/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}