mini-webhook-server
v1.0.4
Published
A small, dependency free, single route webhook server
Downloads
1
Readme
Mini Webhook Server
A small, dependency free, single route webhook server
- Supports POST bodies
- JSON by default (we'll encode responses for you)
- ES8
- No callbacks - routes return an object with 'status' and 'body'
- Automatic '200 OK' HTTP response when new jobs sent
- Automatic sends reply HTTP request when your job is complete
Usage
const valueFunction = require('./value-function.js'),
miniWebhookServer = require('mini-webhook-server')
const port = 4000,
host = '127.0.0.1'
;(async function() {
await miniWebhookServer(port, host, valueFunction)
})();
Then send a POST request, to /, with the parameters:
- 'arguments' Array - to be passed onto the function being run
- 'replyAddress' String - the URL to send replies to.