Socket
Socket
Sign inDemoInstall

whateverhook

Package Overview
Dependencies
136
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    whateverhook

A stupid network listener that outputs whatever it receives


Version published
Weekly downloads
1
Maintainers
1
Install size
18.2 MB
Created
Weekly downloads
 

Readme

Source

whateverhook

A stupid network listener that outputs whatever it receives.

Context: you have a service that sends webhooks that you need to listen to (& process), but you don't want to setup a full-fledged listener application yet, and instead just need to see whatever gets sent to you from the webhook producer. Then whateverhook is your quick and dirty solution.

How to install

npm install whateverhook

How to use

Create a file, e.g. index.js

// in your index.js file
require('whateverhook/lib/webhook');
// or
require('whateverhook/lib/tcphook');
// depending on whatever type of protocol you need

Then run it with node

PORT=9999 node index.js

The hook will now listen at the given PORT. You can then use e.g. ngrok to make it available to the public and point your webhooks to it. When the data arrives, it will be spewed out from the console.

How NOT to use

if you do this

const wrongUsage = require('whateverhook');

you will get an error message such as this:

Error: Please `require` specific libraries from `whateverhook/lib/*`. available choices are: tcphook.js, webhook.js

Pro-tip: the above error message will tell you which actual values you can require.

Keywords

FAQs

Last updated on 31 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc