Skip to content

ContextBroker/WebhookPost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebhookPost

A webhook for your application

Build Status Coverage Status

npm npm-dl

Add easily a webhook to your application both on Node.js and browser as an stream of objects. It can be able to use a remote ServerSent Events server or enable an ad-hoc local web server, both directly or by using a proxy like post2sse or browserver.

Install

npm install --save webhook-post

Usage

WebhookPost is a Node.js stream Readable object. It accept as argument the remote SSE server url as a string, the local ad-hoc web server port as a Ǹumber, or an object with the local ad-hoc web server hostname and port.

To stop listening for notifications and emitting them on data events, just call the .close() method.