1.0.4 • Published 5 years ago

mini-webhook-server v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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.
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago