GithubHelp home page GithubHelp logo

sea-kg / webhook-handler Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 445 KB

webhook-handler service

License: MIT License

CMake 0.58% Shell 0.04% C++ 98.71% Python 0.51% Makefile 0.05% NASL 0.11%
cpp webhook-handler service webhook

webhook-handler's Introduction

webhook-handler

HTTP endpoints (hooks) - no ssl configuration (use a http-server with proxy)

Build Status Github Stars Github Stars Github Forks Total alerts Language grade: C/C++

Install

Ubuntu. PPA

Build on debian/ubuntu

Install requriments

$ apt-get -y update && apt-get install -y \
    make cmake \
    g++ \
    pkg-config

Build

$ ./clean.sh && ./build_simple.sh

Run

./webhook-handler --dir ./data start

Configuration examples

File ./data/webhook-handler-conf.yml (or server will try search in /etc/webhook-handler):

# server configuration
server:
  port: 8002
  wait-seconds-between-run-scripts: 60
  max-script-threads: 1
  max-deque: 100
  allow-status-page: yes
  status-page-url-path: "/wh/status" # will work if 'allow-status-page: yes'
  log-dir: "./logs"

Where

  • server/port - number, web port (default 8002)

  • server/allow-status-page - boolean, enable or disable status page (default: no)

  • server/status-page-url-path - string, path to page with status of server (default: "/wh/status")

  • server/log-dir - string, path to log directory (default: "/var/log/webhook-handler/")

  • server/max-script-threads - number, max count of threads for handling webhooks

  • server/wait-seconds-between-run-scripts - number,

  • server/max-deque - number, max value of possible webhooks handlers

  • webhook-handlers/%webhookid%/commands - list of commands to execute (Variables: %WEBHOOK_DATA_FILE_PATH% - path to file with income data with webhooks)

File ./data/%dir%/webhook.conf:

id = %webhookid%
script_path = ./rebuild.sh
script_wait_in_sec = 600
enabled = yes
  • id - unique id of webhook (replace on randoms string [A-Za-z0-9])
  • script_path - path to script, relative
  • script_wait_in_sec - how much time wait

After start server will be here

unique id of webhook, Webhook will like http://localhost:%port%/%webhook-url-path%

webhook-handler's People

Contributors

sea-kg avatar

Stargazers

Max Fuxjäger avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

webhook-handler's Issues

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.