Skip to content

🔭 Allows you to easily test webhooks and other types of HTTP requests

License

Notifications You must be signed in to change notification settings

lewagon/webhook-tester

 
 

Repository files navigation

Logo

WebHook Tester

Release version Project language Build Status Release Status Coverage License

With this application you instantly get a unique, random URL that you can use to test and debug Webhooks and HTTP requests.

screenshot

Dependencies

All what you need to start this application - is a redis server, which is running on your host or in docker container.

Starting

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 on 6379 port. Or you can try to use cloud version of redis.

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 (like 1.2.3) instead.

image stats

All supported image tags can be found here.

Additional configuration

All supported serve command flags can be found by running docker run --rm -t tarampampam/webhook-tester serve -h.

Pusher.com

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.

Allowed environment variables

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

Liveness/readiness probes

HTTP get /live and /ready respectively.

Testing

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

Release date Commits since latest release

Changes log can be found here.

Releasing

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 or v1.2.3-RC1)

Support

Issues Issues

If you will find any package errors, please, make an issue in current repository.

License

This is open-sourced software licensed under the MIT License.

About

🔭 Allows you to easily test webhooks and other types of HTTP requests

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 70.8%
  • Vue 19.4%
  • JavaScript 4.6%
  • HTML 3.0%
  • Makefile 1.1%
  • Dockerfile 1.1%