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)