Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djdefi/webhook-muxer
Muxer for webhooks written in Ruby (Sinatra)
https://github.com/djdefi/webhook-muxer
cicd webhooks
Last synced: 2 months ago
JSON representation
Muxer for webhooks written in Ruby (Sinatra)
- Host: GitHub
- URL: https://github.com/djdefi/webhook-muxer
- Owner: djdefi
- License: unlicense
- Created: 2021-07-17T20:58:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T14:28:05.000Z (3 months ago)
- Last Synced: 2024-10-05T14:23:19.595Z (3 months ago)
- Topics: cicd, webhooks
- Language: Ruby
- Homepage:
- Size: 86.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webhook muxer
This is a simple proof of concept that allows you to forward incoming webhooks to any number of URLs.
# Installation
```bash
bundle install
```# Usage
1. Create a file called `urls.txt` with one url per line.
2. Run the server:
```bash
ruby webhook-muxer.rb
```
3. Send a webhook to the server:
```bash
curl -X POST -d '{"foo": "bar"}' http://localhost:4567/
```
4. The server will forward the webhook payload to all urls in `urls.txt`.## Async delivery
An async delivery option is also available.
```bash
curl -X POST -d '{"foo": "bar"}' http://localhost:4567/async
```The server will return a 200 status code immediately, and then deliver the webhook payload to all urls in `urls.txt` asynchronously. Any errors in forwarding will not be reported in the response.