Skip to content

Commit 0b06423

Browse files
authored
Merge pull request benjojo#2 from intrand/master
add flexibility for swarm friendliness
2 parents 2116bc8 + 809cc41 commit 0b06423

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ type discordOut struct {
4444
}
4545

4646
func main() {
47-
whURL := flag.String("webhook.url", "https://blah", "")
47+
webhookUrl := os.Getenv("webhook")
48+
whURL := flag.String("webhook.url", webhookUrl, "")
4849
flag.Parse()
49-
http.ListenAndServe("localhost:9094", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
50+
http.ListenAndServe(":9094", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
5051
b, err := ioutil.ReadAll(r.Body)
5152
if err != nil {
5253
panic(err)

0 commit comments

Comments
 (0)