ntfy-alertmanager/main.go
Thorben Günther 8cdd87e73b
Initial commit
2022-10-09 14:19:48 +02:00

20 lines
398 B
Go

package main
import (
"net/http"
"strings"
"git.xenrox.net/~xenrox/go-log"
)
func handleWebhooks(w http.ResponseWriter, r *http.Request) {
http.Post("https://ntfy.sh/alertmanager_test", "text/plain",
strings.NewReader("Payload received"))
}
func main() {
logger := log.NewDefaultLogger()
http.HandleFunc("/", handleWebhooks)
logger.Fatal(http.ListenAndServe("127.0.0.1:8080", nil))
}