๐Ÿ“ฆ songquanpeng / webhook

Execute predefined commands on your server when receiving a specific HTTP GET request.

โ˜… 13 stars โ‘‚ 0 forks ๐Ÿ‘ 13 watching
webhookwebhook-serverwebhooks-catcher
๐Ÿ“ฅ Clone https://github.com/songquanpeng/webhook.git
HTTPS git clone https://github.com/songquanpeng/webhook.git
SSH git clone git@github.com:songquanpeng/webhook.git
CLI gh repo clone songquanpeng/webhook
Song Song bug fix dc2c685 5 years ago ๐Ÿ“ History
๐Ÿ“‚ dc2c685195bdcd67baa64e8856bddb1a8686b7ec View all commits โ†’
๐Ÿ“ cli
๐Ÿ“ server
๐Ÿ“ webhook
๐Ÿ“„ .gitignore
๐Ÿ“„ go.mod
๐Ÿ“„ go.sum
๐Ÿ“„ README.md
๐Ÿ“„ README.md

Webhook Service

Build

go build -o ./bin/cli ./cli/main.go 
go build -o ./bin/server ./server/main.go

Usage

Cli

You can use ./cli command to run specified command.

Or you can use ./cli to get into the cli's shell and execute commands.

Commands

  • n / new: create new webhook.
  • d / delete id: delete specified webhook.
  • m / modify id: modify existed webhook.
  • e / execute id: execute specified webhook.
  • l / list: list all webhooks.
  • s / search keyword: search webhooks by a keyword in name or description.
  • p / print id: print detail information of specified webhooks.
  • h / help: print help information.
  • q / quit: quit cli shell.

Server

Start server by run ./server or ./server port, the default port is 8080.

Start server with pm2: pm2 start ./server --name webhook-service -- 8080.