From 018a86232de77371bc7856209c7d5b0d9d7affc3 Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 7 Mar 2021 00:03:48 -0500 Subject: [PATCH] Add bind debug --- main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 7ded826..c23e4c4 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,7 @@ var ( func main() { viper.SetDefault("threads", runtime.NumCPU()) viper.SetDefault("rules", "pkg:github/Neo23x0/signature-base#yara") + viper.SetDefault("bind", ":8080") viper.AutomaticEnv() @@ -74,7 +75,11 @@ func main() { r.Post("/scan", scanHandler) - go http.ListenAndServe(":8080", r) + bind := viper.GetString("bind") + + log.WithField("bind", bind).Info("Binding to address") + + go http.ListenAndServe(bind, r) ch := make(chan os.Signal)