Code Monkey home page Code Monkey logo

simple-webhook's Introduction

Simple Webhook

Quick and easy to setup solution for testing webhooks, using Golang and ngrok.

Docker Usage

This project can be used via Docker, without the need of any Go tools installed to make the build for your host OS.

To run the webhook application, execute the following command. The ngrok token can be retrieved from your Ngrok Dashboard. This application will not keep any copies nor forward the provided token. It's usage is entirely local.

NGROK_TOKEN='YOUR NGROK TOKEN HERE' make run

The webhook URL will be the domain exhibited after webhook initialization + "/webhook", e.g. http://xxxx-xxx-xxx-xx-xx-xxx.ngrok.xyz/webhook. All received requests will be logged to history.log. This file's contents are displayed by the docker container logs for convenience.

To clean the log file and docker image generated by this workflow, run the following command:

make clean

Command Line Usage

If you want more flexibility and/or access to the application flags, run the following command to install it to your PATH (note that this method requires the Go toolkit to be installed and available on your CLI):

make local-install

To remove the installed app from your PATH, run the following command:

make local-clean

Application Flags

Available flags are listed below:

Flag Description Default
-h Shows app help information -
-p Define app HTTP port 8080
-l Define full log path history.log
-e Define webhook endpoint route /webhook
-t Define whether to run locally or via ngrok tunnel -
-a Provide Ngrok authtoken [REQUIRED]

Exemples:

Setting custom port and output log file path:

simple-webhook -p 5000 -l history.log

Setting custom endpoint route and opting for ngrok execution

simple-webhook -e /webhook -t -a xxxxxxxyyyyzzzzzzz

simple-webhook's People

Contributors

ia-simon avatar josecmojap avatar

Watchers

 avatar

Forkers

josecmojap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.