With this application you instantly get a unique, random URL that you can use to test and debug Webhooks and HTTP requests.
All what you need to start this application - is a redis server, which is running on your host or in docker container.
Download compiled application from releases page (also you will need to download ./web
directory from this repository) or compile from sources and run it locally:
$ git clone https://github.com/tarampampam/webhook-tester.git ./webhook-tester && cd $_
$ go build -ldflags="-s -w" ./cmd/webhook-tester/
$ ./webhook-tester serve --port 8080 --redis-host 127.0.0.1 --redis-port 6379
For this
redis
server must be installed and started locally on6379
port. Or you can try to use cloud version ofredis
.
Or use ready docker image for this. Simple docker-compose
file below:
version: '3.4'
volumes:
redis-data:
services:
app:
image: tarampampam/webhook-tester:latest
command: serve --port 8080 --redis-host redis
ports:
- '8080:8080/tcp' # Open <http://127.0.0.1:8080>
redis:
image: redis:6.0.5-alpine
volumes:
- redis-data:/data:cached
ports:
- 6379
Important notice: do not use
latest
application tag (this is bad practice). Use versioned tag (like1.2.3
) instead.
All supported image tags can be found here.
All supported serve
command flags can be found by running docker run --rm -t tarampampam/webhook-tester serve -h
.
For incoming webhook notifications without index page refreshing, you can setup pusher.com
as websocket provider. For this - register new app and start serving with following arguments: ./webhook-tester serve ... --pusher-app-id=YOUR_APP_ID --pusher-key=YOUR_KEY --pusher-secret=YOUR_SECRET --pusher-cluster=YOUR_CLUSTER
.
Variable name | Description |
---|---|
LISTEN_ADDR |
IP address to listen on |
LISTEN_PORT |
TCP port number |
PUBLIC_DIR |
Directory with public assets |
MAX_REQUESTS |
Maximum stored requests per session |
SESSION_TTL |
Session lifetime (in seconds) |
REDIS_HOST |
Redis server hostname or IP address |
REDIS_PORT |
Redis server TCP port number |
REDIS_PASSWORD |
Redis server password (optional) |
REDIS_DB_NUM |
Redis database number |
REDIS_MAX_CONN |
Maximum redis connections |
PUSHER_APP_ID |
Pusher application ID |
PUSHER_KEY |
Pusher key |
PUSHER_SECRET |
Pusher secret |
PUSHER_CLUSTER |
Pusher cluster |
HTTP get /live
and /ready
respectively.
For application testing we use built-in golang testing feature and docker-ce
+ docker-compose
as develop environment. So, just write into your terminal after repository cloning:
$ make test
Changes log can be found here.
New versions publishing is very simple - just "publish" new release using repo releases page.
Release version (and git tag, of course) MUST starts with
v
prefix (eg.:v0.0.1
orv1.2.3-RC1
)
If you will find any package errors, please, make an issue in current repository.
This is open-sourced software licensed under the MIT License.