Add bind debug
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tyler 2021-03-07 00:03:48 -05:00
parent 16fc55f38e
commit 018a86232d
1 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,7 @@ var (
func main() { func main() {
viper.SetDefault("threads", runtime.NumCPU()) viper.SetDefault("threads", runtime.NumCPU())
viper.SetDefault("rules", "pkg:github/Neo23x0/signature-base#yara") viper.SetDefault("rules", "pkg:github/Neo23x0/signature-base#yara")
viper.SetDefault("bind", ":8080")
viper.AutomaticEnv() viper.AutomaticEnv()
@ -74,7 +75,11 @@ func main() {
r.Post("/scan", scanHandler) 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) ch := make(chan os.Signal)